<template>
  <div id="add-cater-merchants" class="route-page">
    <el-button
      @click="goback()"
      size="mini"
      round
      style="margin-left: 950px"
      type="primary"
      >返回</el-button
    >
    <div class="container" style="padding-left: 80px; padding-right: 20px">
      <el-form
        ref="formCorp"
        :model="formCorp"
        :rules="rules"
        :inline-message="true"
        label-position="left"
        label-width="100px"
        size="medium"
        :disabled="!this.$route.params.flagaddshop"
      >
        <span
          style="
                        font-size: 20px;
                        margin: 30px 40px;
                        display: inline-block;
                        color: #000;
                    "
        >
          <i class="el-icon-document"></i>基础信息
        </span>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="店铺名称:" prop="storeName">
                <el-input
                  v-model="formCorp.storeName"
                  placeholder="请输入店铺名称"
                  clearable
                  style="width: 180px"
                ></el-input>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="15" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item label="店铺类型:" prop="storeType">
                <template v-for="item in storeType">
                  <el-radio
                    :key="item.value"
                    v-model="formCorp.storeType"
                    :label="item.value"
                    >{{ item.label }}</el-radio
                  >
                </template>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="所属大区:" prop="upOrgSeq">
                <select
                  v-model="formCorp.upOrgSeq"
                  placeholder="请选择"
                  clearable
                  @change="selCore(formCorp.upOrgSeq)"
                  style="
                                        width: 180px;
                                        border: 1px #ccc solid;
                                        height: 35px;
                                    "
                >
                  <option
                    v-for="item in corpList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  ></option>
                </select>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="6" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item
                label="所属营销区域:"
                label-width="110px"
                prop="baseName"
              >
                <el-select
                  v-model="formCorp.baseName"
                  placeholder="请选择"
                  clearable
                  @change="selbase(formCorp.baseName)"
                  style="
                                        width: 180px;
                                        border: 1px #ccc solid;
                                        height: 35px;
                                    "
                >
                  <el-option
                    v-for="item in RentalPayWay"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </div>
          </el-col>
          <!-- <el-col :span="6" :push="4">
            <div class="grid-content bg-purple">
              <el-form-item label="所属业务员:" prop="basePersonName">
                <el-select v-model="formCorp.basePersonName" placeholder="请选择" clearable   style="width:180px">
                  <el-option
                    v-for="item in Renarr"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  ></el-option>
                </el-select>
              </el-form-item>
            </div>
          </el-col> -->
        </el-row>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="经营面积(㎡):"
                prop="managerArea"
                label-width="110px"
              >
                <el-input
                  v-model="formCorp.managerArea"
                  placeholder="请输入经营面积"
                  clearable
                  style="width: 180px"
                  type="number"
                ></el-input>
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="6" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item
                label="订单客户编号:"
                prop="orderCustomerCode"
                label-width="110px"
              >
                <el-input
                  v-model="formCorp.orderCustomerCode"
                  style="width: 180px"
                  placeholder="请输入订单客户编号"
                />
              </el-form-item>
            </div>
          </el-col>
        </el-row>
      </el-form>
      <!-- </el-col>
      </el-row>-->
      <!-- 商户选择 end -->

      <!-- 填写店铺信息 -->
      <!-- <el-row>
      <el-col :span="12" :offset="6">-->
      <el-form
        ref="formShop"
        :model="formShop"
        :rules="shopRules"
        :inline-message="true"
        label-position="left"
        label-width="95px"
        :disabled="!this.$route.params.flagaddshop"
      >
        <span
          style="
                        font-size: 20px;
                        margin: 30px 40px;
                        display: inline-block;
                        color: #000;
                    "
        >
          <i class="el-icon-suitcase"></i>店铺信息
        </span>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="开业日期:" prop="openDate">
                <el-date-picker
                  v-model="formShop.openDate"
                  placeholder="选择日期"
                  format="yyyy-MM-dd"
                  value-format="yyyy-MM-dd"
                  type="date"
                ></el-date-picker>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="8" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item label="所属省市:" prop="city">
                <v-distpicker
                  :province="select.province"
                  :city="select.city"
                  :area="select.area"
                  @selected="onSelected"
                  style="width: 1000px"
                ></v-distpicker>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20" style="margin-bottom: 20px">
          <el-col :span="6" :push="1">
            <div
              class="grid-content bg-purple"
              style="position: absolute; z-index: 1010"
            >
              <el-select
                class="grid-content__select"
                popper-class="grid-content__select--popper"
                v-model="suggestion"
                filterable
                remote
                reserve-keyword
                placeholder="请输入店铺地址:"
                :remote-method="tublur"
                :loading="suggestionLoading"
                value-key="location"
                @change="onSelectAddress"
              >
                <el-option
                  v-for="item in suggestionList"
                  :key="item.id"
                  :label="
                    `${item.address}  ${item.province} - ${item.city} - ${item.district}`
                  "
                  :value="item.id"
                />
              </el-select>
            </div>
          </el-col>
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <div
                id="container"
                style="width: 900px; height: 400px"
                @click="clicktu()"
              ></div>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="店铺地址:" prop="storeAddressDetail">
                <!-- <el-button
                  type="primary"
                  @click="getlocation()"
                  size="mini"
                  icon="el-icon-search"
                  style="margin-top:5px"
                >点击地图获取经纬度详细地址</el-button>-->
                <el-input
                  v-model="formShop.storeAddressDetail"
                  placeholder="请获取店铺详细地址"
                  clearable
                  style="width: 280px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="6" :push="4">
            <div class="grid-content bg-purple">
              <el-form-item label="经度:" prop="storeLng">
                <el-input
                  v-model="formShop.storeLng"
                  placeholder="请获取经度"
                  clearable
                  disabled
                ></el-input>
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="6" :push="4">
            <div class="grid-content bg-purple">
              <el-form-item label="纬度:" prop="storeLat">
                <el-input
                  v-model="formShop.storeLat"
                  placeholder="请获取纬度"
                  clearable
                  disabled
                ></el-input>
              </el-form-item>
            </div>
          </el-col>
        </el-row>

        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="经销商名:" prop="companyName">
                <el-input
                  v-model="formShop.companyName"
                  placeholder="请输入经销商名"
                  clearable
                  style="width: 220px"
                  disabled
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="12" :push="4">
            <div class="grid-content bg-purple">
              <el-form-item label="营业时间:" required>
                <el-form-item prop="value1" style="display: inline-block;">
                  <el-time-picker
                    v-model="formShop.value1"
                    value-format="HH:mm"
                    placeholder="营业开始时间"
                    style="width: 150px"
                    @change="changekaishi(formShop.value1)"
                  ></el-time-picker> </el-form-item
                >-
                <el-form-item prop="value2" style="display: inline-block;">
                  <el-time-picker
                    arrow-control
                    v-model="formShop.value2"
                    value-format="HH:mm"
                    placeholder="营业结束时间"
                    style="width: 150px"
                    @change="changejieshu(formShop.value2)"
                  ></el-time-picker>
                </el-form-item>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
      </el-form>

      <!-- 填写店铺信息 end -->
      <span
        style="
                    font-size: 20px;
                    margin: 30px 40px;
                    display: inline-block;
                    color: #000;
                "
      >
        <i class="el-icon-document"></i>店铺人员信息
      </span>
      <el-form :inline="true" :model="formInline" class="demo-form-inline">
        <el-form-item label="店员姓名：">
          <el-input v-model="formInline.realName" placeholder></el-input>
        </el-form-item>
        <el-form-item label="手机号：">
          <el-input v-model="formInline.tel" placeholder></el-input>
        </el-form-item>
        <el-form-item label="身份证号码：">
          <el-input v-model="formInline.idCard" placeholder></el-input>
        </el-form-item>
        <el-form-item label="店铺人员编码：">
          <el-input v-model="formInline.employeeNo" placeholder></el-input>
        </el-form-item>
        <el-form-item label="状态：">
          <el-select v-model="formInline.status" placeholder="全部" clearable>
            <el-option label="启用" value="1"></el-option>
            <el-option label="停用" value="0"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button
            type="primary"
            @click="search()"
            size="mini"
            icon="el-icon-search"
            >查询</el-button
          >
        </el-form-item>
        <el-form-item>
          <el-button
            type="primary"
            @click="kong()"
            size="mini"
            icon="el-icon-delete"
            >清空</el-button
          >
        </el-form-item>
        <el-form-item>
          <el-button
            type="primary"
            @click="creatoneOrg()"
            size="mini"
            icon="el-icon-edit"
            >新增</el-button
          >
        </el-form-item>
        <!-- <el-form-item>
        <el-button type="primary" @click="goback()" size="mini" >返回</el-button>
      </el-form-item> -->
      </el-form>
      <el-table
        :data="tableData"
        :header-cell-style="{ background: '#eef1f6', color: '#606266' }"
        style="width: 100%; margin-bottom: 20px"
        row-key="goodsTypeId"
        border
        v-loading="loading"
        default-expand-all
      >
        <el-table-column
          type="index"
          label="序号"
          align="center"
          width="60"
          fixed
        ></el-table-column>

        <el-table-column
          prop="employeeNo"
          label="店员编号"
          width="180"
        ></el-table-column>

        <el-table-column
          prop="userType"
          label="职位"
          align="center"
          width="150"
        >
          <template slot-scope="scope">
            <span v-if="scope.row.userType == 4">店主</span>
            <span v-if="scope.row.userType == 5">店长</span>
            <span v-if="scope.row.userType == 6">店员</span>
          </template>
        </el-table-column>
        <el-table-column prop="sex" label="性别" width="100" align="center">
          <!-- <template slot-scope="scope">{{scope.row.sex===1?'男':'女'}}</template> -->
          <template slot-scope="scope">
            <span v-if="scope.row.sex == 1">男</span>
            <!-- <span v-if="scope.row.sex==2">女</span> -->
            <span v-if="scope.row.sex == 0">女</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="realName"
          label="店员姓名"
          width="180"
          align="center"
        ></el-table-column>

        <el-table-column
          prop="tel"
          label="手机号码"
          align="center"
          width="150"
        ></el-table-column>
        <el-table-column
          prop="academic"
          label="学历"
          align="center"
          width="150"
        >
          <template slot-scope="scope">
            <span v-if="scope.row.academic == 0">高中以下</span>
            <span v-if="scope.row.academic == 1">大专</span>
            <span v-if="scope.row.academic == 2">本科</span>
            <span v-if="scope.row.academic == 3">硕士</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="isFullTime"
          label="是否专职"
          align="center"
          width="100"
        >
          <template slot-scope="scope">
            <span v-if="scope.row.isFullTime == 0">否</span>
            <span v-if="scope.row.isFullTime == 1">是</span>
          </template>
        </el-table-column>

        <el-table-column
          prop="workYear"
          label="工作年限（年）"
          align="right"
          width="150"
        >
        </el-table-column>
        <el-table-column
          prop="idCard"
          label="身份证号码"
          align="center"
          width="180"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="headPicUrl"
          label="店员头像"
          width="200"
        >
          <template slot-scope="scope">
            <img
              :src="scope.row.headPicUrl"
              v-if="scope.row.headPicUrl != '' && scope.row.headPicUrl != null"
              width="70"
              height="50"
            />
          </template>
        </el-table-column>
        <el-table-column prop="status" label="状态" width="100" align="center">
          <template slot-scope="scope">{{
            scope.row.status === 0 ? '停用' : '启用'
          }}</template>
        </el-table-column>

        <el-table-column
          prop="memberCount"
          label="绑定会员数"
          align="right"
          width="120"
        ></el-table-column>
        <el-table-column
          prop="saleAmount"
          label="销售额"
          align="right"
        ></el-table-column>
        <el-table-column
          prop="createTime"
          label="创建时间"
          align="center"
          width="200"
        ></el-table-column>
        <!-- <el-table-column prop="authCode" label="店铺编码" align="right" width="120"></el-table-column> -->
        <el-table-column prop="saleAmount" label="信息是否完整" align="center">
          <template slot-scope="scope">
            <span v-if="scope.row.isInfoComplete == 0">否</span>
            <span v-if="scope.row.isInfoComplete == 1">是</span>
          </template>
        </el-table-column>

        <el-table-column
          prop="onboardDate"
          label="上岗日期"
          align="center"
          width="200"
        ></el-table-column>
        <el-table-column label="操作" width="280" align="center" fixed="right">
          <template slot-scope="scope">
            <el-button
              type="text"
              v-if="scope.row.status == 1 && scope.row.userType != 5"
              size="mini"
              @click="
                updateStatus(
                  scope.row.uuid,
                  scope.row.userId,
                  0,
                  scope.row.userType,
                  scope.row
                )
              "
              >停用</el-button
            >
            <el-button
              type="text"
              v-if="scope.row.status == 0 && scope.row.userType != 5"
              @click="
                updateStatus(
                  scope.row.uuid,
                  scope.row.userId,
                  1,
                  scope.row.userType,
                  scope.row
                )
              "
              size="mini"
              >启用</el-button
            >
            <el-button type="text" size="mini" @click="changeorg(scope.row)"
              >修改</el-button
            >
            <el-button
              type="text"
              size="mini"
              @click="handledelete(scope.row)"
              v-if="scope.row.userType != 5"
              >删除
            </el-button>
          </template>
        </el-table-column>
        <!-- <el-table-column label="操作" width="280" align="center" fixed="right" v-if="this.flagdianyuanone">
        <template slot-scope="scope">  -->
        <!-- <el-button
            type="text"
            v-if="scope.row.status == 1"
            size="mini"
            @click="updateStatus(scope.row.userId,0)"
          >停用</el-button>
          <el-button
            type="text"
            v-if="scope.row.status == 0"
            @click="updateStatus(scope.row.userId,1)"
            size="mini"
          >启用</el-button> -->
        <!-- <el-button type="text" size="mini" @click="changeorg(scope.row)">修改</el-button> -->
        <!-- <el-button type="text" size="mini" @click="handledelete(scope.row)">删除</el-button> -->
        <!-- </template>
      </el-table-column> -->
      </el-table>
      <el-form :inline="true" :model="formInline">
        <el-form-item style="margin-top: 6px"></el-form-item>
      </el-form>
      <div class="block" style="margin-top: -49px">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :page-sizes="[10, 20, 30, 50, 100]"
          :current-page="listQuery.current"
          :page-size="listQuery.size"
          layout="total, sizes, prev, pager, next, jumper"
          :total="total"
        ></el-pagination>
      </div>

      <el-dialog title="信息" :visible.sync="dialogVisibleorg" width="50%">
        <el-form
          :model="ruleForm"
          :rules="dianyuanrules"
          ref="ruleForm"
          label-width="120px"
        >
          <el-form-item label="姓名" prop="realName">
            <el-input
              v-model="ruleForm.realName"
              maxlength="20"
              :disabled="salesclerkFlag"
            ></el-input>
          </el-form-item>
          <el-form-item prop="onboardDate" label="上岗日期">
            <el-date-picker
              placeholder="选择日期"
              v-model="ruleForm.onboardDate"
              style="width: 70%"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="性别" prop="sex">
            <el-select v-model="ruleForm.sex">
              <el-option label="男" value="1"></el-option>
              <el-option label="女" value="0"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="学历" prop="academic">
            <el-select v-model="ruleForm.academic">
              <el-option label="高中以下" value="0"></el-option>
              <el-option label="大专" value="1"></el-option>
              <el-option label="本科" value="2"></el-option>
              <el-option label="硕士" value="3"></el-option>
            </el-select>
          </el-form-item>

          <el-form-item label="是否专职" prop="isFullTime">
            <el-select v-model="ruleForm.isFullTime">
              <el-option label="是" value="1"></el-option>
              <el-option label="否" value="0"></el-option>
            </el-select>
          </el-form-item>

          <el-form-item label="工作年限" prop="workYear">
            <el-input
              v-model="ruleForm.workYear"
              type="number"
              style="width: 200px"
              min="0"
            ></el-input>
            <span>年</span>
          </el-form-item>
          <div style="margin-left:7.5rem; color:#808080;font-size: 0.75rem;">
            <span style="color:#E65D6E;">* 提示:</span
            >店长手机号不能与店主手机号相同
          </div>
          <el-form-item label="手机号" prop="tel">
            <el-input v-model="ruleForm.tel"></el-input>
          </el-form-item>
          <el-form-item label="身份证号码" prop="idCard">
            <el-input
              v-model="ruleForm.idCard"
              :disabled="salesclerkFlag"
            ></el-input>
          </el-form-item>
          <el-form-item label="状态" prop="status">
            <el-select v-model="ruleForm.status" :disabled="this.flagdianone">
              <el-option label="停用" value="0"></el-option>
              <el-option label="启用" value="1"></el-option>
            </el-select>
          </el-form-item>

          <el-form-item :label="shopname" prop="headPicUrl">
            <el-row>
              <el-col style="margin: 10px; 0px; 10px; 0">
                <el-upload
                  style="margin: 10px"
                  :action="action"
                  list-type="picture-card"
                  :limit="1"
                  :on-preview="handlePictureCardPreviewyuan"
                  :on-success="upLoadPiconeyuan"
                  :on-change="handleImgChangeoneyuan"
                  :file-list="imgListoneyuan"
                  :headers="headers"
                >
                  <i class="el-icon-plus"></i>
                </el-upload>
              </el-col>
            </el-row>
          </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
          <el-button @click="dialogVisibleorg = false" size="mini"
            >取 消</el-button
          >
          <el-button type="primary" @click="confirmEditone()" size="mini"
            >确 定</el-button
          >
        </span>
      </el-dialog>
      <el-dialog :visible.sync="dialogVisibleImg">
        <img width="100%" :src="dialogImageUrl" alt />
      </el-dialog>

      <!-- 填写展示信息 -->

      <el-form
        ref="formShopShow"
        :model="formShopShow"
        :rules="shopShowRules"
        :inline-message="true"
        label-position="left"
        label-width="95px"
        :disabled="!this.$route.params.flagaddshop"
      >
        <span
          style="
                        font-size: 20px;
                        margin: 30px 40px;
                        display: inline-block;
                        color: #000;
                    "
        >
          <i class="el-icon-data-analysis"></i>展示信息
        </span>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="法人:" prop="legalPerson">
                <el-input
                  v-model="formShopShow.legalPerson"
                  placeholder="请输入法人名称"
                  clearable
                  style="width: 200px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="6" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item label="法人手机号:" prop="legalPersonPhone">
                <el-input
                  onkeyup="this.value=this.value.replace(/[^\d.]/g,'');"
                  v-model="formShopShow.legalPersonPhone"
                  placeholder="请输入法人手机号"
                  clearable
                  style="width: 200px"
                ></el-input>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="店主姓名:" prop="storeOwnerName">
                <el-input
                  v-model="formShopShow.storeOwnerName"
                  placeholder="请输入店主姓名"
                  clearable
                  style="width: 200px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="6" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item label="店主手机号:" prop="storeOwnerPhone">
                <el-input
                  v-model="formShopShow.storeOwnerPhone"
                  placeholder="请输入店主手机号"
                  clearable
                  onkeyup="this.value=this.value.replace(/[^\d.]/g,'');"
                  style="width: 200px"
                ></el-input>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="店铺电话:" prop="storePhone">
                <el-input
                  v-model="formShopShow.storePhone"
                  placeholder="请输入店铺电话"
                  clearable
                  style="width: 180px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>

          <!-- <el-col :span="6" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item label="店长姓名:" prop="storeManagerName">
                <el-input v-model="formShopShow.storeManagerName" placeholder="请输入店长姓名" clearable style="width:180px"></el-input>
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="6" :push="4">
            <div class="grid-content bg-purple">
              <el-form-item label="店长电话:" prop="storeManagerPhone">
                <el-input
                  v-model="formShopShow.storeManagerPhone"
                  placeholder="请输入店长电话"
                  clearable
                  onkeyup="this.value=this.value.replace(/[^\d.]/g,'');"
                  style="width:180px"
                ></el-input>
              </el-form-item>
            </div>
          </el-col> -->
        </el-row>

        <el-row :gutter="20">
          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="店主照片:"
                prop="storeOwnerPic"
                label-width="170px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreview2"
                      :on-success="upLoadPictwo"
                      :on-remove="handleRemovetwo"
                      :on-change="handleImgChangetwo"
                      :before-upload="beforeAvatarUploadtwo"
                      :file-list="imgListtwo"
                      :headers="headers"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible3">
                      <img width="100%" :src="dialogImageUrl2" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span
                  style="
                                        font-size: 12px;
                                        margin-left: 20px;
                                        color: red;
                                    "
                  >（注：图片大小不超过30M）</span
                >
              </el-form-item>
            </div>
          </el-col>

          <!-- <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="店长照片:" prop="storeManagerPic" label-width="170px">
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px;"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreview3"
                      :on-success="upLoadPicthree"
                      :on-remove="handleRemovethree"
                      :on-change="handleImgChangethree"
                      :before-upload="beforeAvatarUploadthree"
                      :file-list="imgListthree"
                      :headers="headers"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible4">
                      <img width="100%" :src="dialogImageUrl3" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span style="font-size:12px;margin-left:20px;color:red">（注：图片大小不超过30M）</span>
              </el-form-item>
            </div>
          </el-col> -->
        </el-row>

        <el-row :gutter="20" v-if="meridflagone">
          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="营业执照协议号:"
                prop="merid"
                label-width="150px"
              >
                <el-input
                  v-model="formRental.businessLicense"
                  placeholder="请输入营业执照协议号"
                  clearable
                  disabled
                  style="width: 200px"
                ></el-input>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
      </el-form>

      <!-- 填写展示信息 end -->

      <!-- 租金\收银 -->
      <el-form
        ref="formRental"
        :model="formRental"
        :rules="RentalRules"
        :inline-message="true"
        label-position="left"
        label-width="140px"
        :disabled="!this.$route.params.flagaddshop"
        v-if="meridflag"
      >
        <span
          style="
                        font-size: 20px;
                        margin: 30px 40px;
                        display: inline-block;
                        color: #000;
                    "
        >
          <i class="el-icon-bank-card"></i>收银信息
        </span>
        <el-row :gutter="20">
          <el-col :span="6" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item label="工行Merid(12位码):" prop="merid">
                <el-input
                  v-model="formRental.merid"
                  placeholder="请输入工行Merid(12位码)"
                  clearable
                  disabled
                  style="width: 180px"
                ></el-input>
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="6" :push="3">
            <div class="grid-content bg-purple">
              <el-form-item
                label="工行协议号:"
                prop="agreement"
                label-width="100px"
              >
                <el-input
                  v-model="formRental.agreement"
                  placeholder="请输入工行协议"
                  clearable
                  disabled
                  style="width: 180px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="6" :push="4">
            <div class="grid-content bg-purple">
              <el-form-item
                label="微信识别码:"
                prop="wechatId"
                label-width="100px"
              >
                <el-input
                  v-model="formRental.wechatId"
                  placeholder="请输入微信识别码"
                  clearable
                  disabled
                  style="width: 180px"
                >
                </el-input>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
      </el-form>
      <el-form
        ref="formRental"
        :model="formRental"
        :rules="RentalRules"
        :inline-message="true"
        label-position="left"
        label-width="140px"
        :disabled="!this.$route.params.flagaddshop"
        v-if="meridflagone"
      >
        <span
          style="
                        font-size: 20px;
                        margin: 30px 40px;
                        display: inline-block;
                        color: #000;
                    "
        >
          <i class="el-icon-bank-card"></i>工行建档信息
        </span>
        <el-row :gutter="20">
          <el-col :span="18" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="是否有工行对公账户："
                prop="isIcbc"
                label-width="180px"
              >
                <el-select
                  v-model="formRental.isIcbc"
                  @change="changeisIcbc(formRental.isIcbc)"
                  style="width: 200px"
                >
                  <el-option label="是" value="1"></el-option>
                  <el-option label="否" value="0"></el-option>
                </el-select>
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                prop="businessLicense"
                label="营业执照:"
                label-width="180px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      :action="action"
                      list-type="picture-card"
                      :on-preview="handlePictureCardPreview"
                      :on-success="upLoadPic"
                      style="margin: 10px"
                      :limit="1"
                      :on-remove="handleRemove"
                      :on-change="handleImgChange"
                      :file-list="imgList"
                      :before-upload="beforeAvatarUpload"
                      :headers="headers"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible1">
                      <img width="100%" :src="dialogImageUrl" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span
                  style="
                                        font-size: 12px;
                                        margin-left: 20px;
                                        color: red;
                                    "
                  >（注：图片大小不超过30M）</span
                >
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="专卖店门头图片:"
                prop="doorwayPic"
                label-width="170px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreview1"
                      :on-success="upLoadPicone"
                      :on-remove="handleRemoveone"
                      :on-change="handleImgChangeone"
                      :before-upload="beforeAvatarUploadone"
                      :file-list="imgListone"
                      :headers="headers"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisible2">
                      <img width="100%" :src="dialogImageUrl1" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span
                  style="
                                        font-size: 12px;
                                        margin-left: 20px;
                                        color: red;
                                    "
                  >（注：图片大小不超过30M）</span
                >
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="法人身份证正面照片:"
                prop="frontCard"
                label-width="170px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreviewshenzheng"
                      :on-success="upLoadPicshenzheng"
                      :on-remove="handleRemoveshenzheng"
                      :on-change="handleImgChangeshenzheng"
                      :before-upload="beforeAvatarUploadshenzheng"
                      :file-list="imgListshenzheng"
                      :headers="headers"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisibleshenzheng">
                      <img width="100%" :src="dialogImageUrlshenzheng" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span
                  style="
                                        font-size: 12px;
                                        margin-left: 20px;
                                        color: red;
                                    "
                  >（注：图片大小不超过30M）</span
                >
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="10" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="法人身份证背面照片:"
                prop="backCard"
                label-width="170px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreviewshenfan"
                      :on-success="upLoadPicshenfan"
                      :on-remove="handleRemoveshenfan"
                      :on-change="handleImgChangeshenfan"
                      :before-upload="beforeAvatarUploadshenfan"
                      :file-list="imgListshenfan"
                      :headers="headers"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisibleshenfan">
                      <img width="100%" :src="dialogImageUrlshenfan" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span
                  style="
                                        font-size: 12px;
                                        margin-left: 20px;
                                        color: red;
                                    "
                  >（注：图片大小不超过30M）</span
                >
              </el-form-item>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="20" :push="1">
            <div class="grid-content bg-purple">
              <el-form-item
                label="结算账号照片（开户许可证或其他）:"
                prop="settlementPic"
                label-width="170px"
              >
                <el-row>
                  <el-col style="margin: 10px; 0px; 10px; 0">
                    <el-upload
                      style="margin: 10px"
                      :action="action"
                      list-type="picture-card"
                      :limit="1"
                      :on-preview="handlePictureCardPreviewjie"
                      :on-success="upLoadPicjie"
                      :on-remove="handleRemovejie"
                      :on-change="handleImgChangejie"
                      :before-upload="beforeAvatarUploadjie"
                      :file-list="imgListjie"
                      :headers="headers"
                    >
                      <i class="el-icon-plus"></i>
                    </el-upload>
                    <el-dialog :visible.sync="dialogVisiblejie">
                      <img width="100%" :src="dialogImageUrljie" alt />
                    </el-dialog>
                  </el-col>
                </el-row>
                <span
                  style="
                                        font-size: 12px;
                                        margin-left: 20px;
                                        color: red;
                                    "
                  >（注：图片大小不超过30M）</span
                >
              </el-form-item>
            </div>
          </el-col>
        </el-row>

        <el-form-item
          label="法定代表人授权书:"
          label-width="160px"
          style="margin: 50px 0; margin-left: 40px"
          prop="fading"
        >
          <div>
            <span style="color: red; font-size: 12px"
              >注:请按“模板”提示将“打印”件打印出来后填写，再上传扫描件。</span
            >
            <div>
              <!-- <el-button
                type="primary"
                size="small"
                @click="download('1')"
                icon="el-icon-download"
                style="float:left;margin:10px;margin-right:40px"
              >下载模板及打印件</el-button> -->
              <a
                :href="`${baseUrl}/ui/moban/法定代表人授权书模板及打印件.zip`"
                class="xizai"
                >下载模板及打印件</a
              >
              <!-- <el-button type="primary">上传扫描件</el-button> -->
              <el-upload
                :limit="1"
                class="upload-demo"
                :action="action"
                :on-change="handleChangefa"
                :on-success="upLoadPicfa"
                :on-remove="handleRemovefa"
                :file-list="fileListfa"
                :headers="headers"
              >
                <el-button
                  size="small"
                  type="primary"
                  @click="downloadone('1')"
                  icon="el-icon-upload2"
                  style="float: right; margin: 10px"
                  >上传扫描件</el-button
                >
                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
              </el-upload>
            </div>
            <!-- <input
                      type="file"
                      id="people-export"
                      ref="inputer"
                      @change="fileUpload"
                      multiple="multiple"
            />-->
          </div>
        </el-form-item>
        <el-form-item
          label="信息查询使用授权书:"
          label-width="160px"
          prop="xinxi"
          style="margin: 50px 0; margin-left: 40px"
        >
          <div>
            <span style="color: red; font-size: 12px"
              >注:请按“模板”提示将“打印”件打印出来后填写，再上传扫描件。</span
            >
            <div>
              <!-- <el-button
                type="primary"
                size="small"
                @click="download('2')"
                icon="el-icon-download"
                style="float:left;margin:10px;margin-right:40px"
              >下载模板及打印件</el-button> -->
              <a
                :href="`${baseUrl}/ui/moban/信息查询使用授权书.zip`"
                class="xizai"
                >下载模板及打印件</a
              >
              <el-upload
                :limit="1"
                class="upload-demo"
                :action="action"
                :on-change="handleChangexin"
                :on-remove="handleRemovexin"
                :file-list="fileListxin"
                :on-success="upLoadPicxin"
                :headers="headers"
              >
                <el-button
                  size="small"
                  type="primary"
                  @click="downloadone('2')"
                  style="float: right; margin: 10px"
                  icon="el-icon-upload2"
                  >上传扫描件</el-button
                >
                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
              </el-upload>
            </div>
          </div>
        </el-form-item>
        <el-form-item
          label="收单业务书:"
          label-width="160px"
          style="margin: 50px 0; margin-left: 40px"
          prop="shoudan"
        >
          <div style="margin: 20px 0">
            <span style="color: red; font-size: 12px"
              >注:请按“模板”提示将“打印”件打印出来后填写，再上传扫描件。</span
            >
            <div>
              <!-- <el-button
                type="primary"
                size="small"
                @click="download('3')"
                icon="el-icon-download"
                style="float:left;margin:10px;margin-right:40px"
              >下载模板及打印件</el-button> -->
              <a :href="`${baseUrl}/ui/moban/收单业务书.zip`" class="xizai"
                >下载模板及打印件</a
              >
              <el-upload
                :limit="1"
                class="upload-demo"
                :action="action"
                :on-change="handleChangeshou"
                :file-list="fileListshou"
                :on-remove="handleRemoveshou"
                :on-success="upLoadPicshou"
                :headers="headers"
              >
                <el-button
                  size="small"
                  type="primary"
                  @click="downloadone('3')"
                  icon="el-icon-upload2"
                  style="float: right; margin: 10px"
                  >上传扫描件</el-button
                >
                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
              </el-upload>
            </div>
          </div>
        </el-form-item>
        <el-form-item
          label="非金融企业划型信息采集表:"
          label-width="160px"
          style="margin: 50px 0; margin-left: 40px"
          prop="feijin"
        >
          <div style="margin: 20px 0">
            <span style="color: red; font-size: 12px"
              >注:请按“模板”提示将“打印”件打印出来后填写，再上传扫描件。</span
            >
            <div>
              <a
                :href="`${baseUrl}/ui/moban/非金融企业划型信息采集表.zip`"
                class="xizai"
                >下载模板及打印件</a
              >
              <!-- <el-button
                type="primary"
                size="small"
                @click="download('4')"
                icon="el-icon-download"
                style="float:left;margin:10px;margin-right:40px"
              >下载模板及打印件</el-button> -->
              <el-upload
                :limit="1"
                class="upload-demo"
                :action="action"
                :on-change="handleChangefei"
                :file-list="fileListfei"
                :on-remove="handleRemovefei"
                :on-success="upLoadPicfei"
                :headers="headers"
              >
                <el-button
                  size="small"
                  type="primary"
                  @click="downloadone('4')"
                  icon="el-icon-upload2"
                  style="float: right; margin: 10px"
                  >上传扫描件</el-button
                >
                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
              </el-upload>
            </div>
          </div>
        </el-form-item>
        <el-form-item
          label="对公客户信息采集表:"
          label-width="160px"
          style="margin: 50px 0; margin-left: 40px"
          prop="duigong"
        >
          <div style="margin: 20px 0">
            <span style="color: red; font-size: 12px"
              >注:请按“模板”提示将“打印”件打印出来后填写盖章，再上传扫描件。若表中填写了除法人外的人员信息，请同步提供其对应身份证复印件并加盖单位公章，与对公客户信息采集表一起扫描后上传。</span
            >
            <div>
              <a
                :href="`${baseUrl}/ui/moban/对公客户信息采集表.zip`"
                class="xizai"
                >下载模板及打印件</a
              >
              <!-- <el-button
                type="primary"
                size="small"
                @click="download('5')"
                icon="el-icon-download"
                style="float:left;margin:10px;margin-right:40px"
              >下载模板及打印件</el-button> -->
              <el-upload
                :limit="1"
                class="upload-demo"
                :action="action"
                :on-change="handleChangedui"
                :file-list="fileListdui"
                :on-success="upLoadPicdui"
                :on-remove="handleRemovedui"
                :headers="headers"
              >
                <el-button
                  size="small"
                  type="primary"
                  @click="downloadone('5')"
                  icon="el-icon-upload2"
                  style="float: right; margin: 10px"
                  >上传扫描件</el-button
                >
                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
              </el-upload>
            </div>
          </div>
        </el-form-item>
        <el-form-item
          label="非自然人客户受益所有人采集表:"
          label-width="160px"
          style="margin: 50px 0; margin-left: 40px"
          prop="feizi"
        >
          <div style="margin: 20px 0">
            <span style="color: red; font-size: 12px"
              >注:请按“模板”提示将“打印”件打印出来后填写盖章，再上传扫描件。若表中填写了除法人外的人员信息，请同步提供其对应身份证复印件并加盖单位公章，与非自然人客户受益所有人采集表一起扫描后上传。</span
            >
            <div>
              <a
                :href="`${baseUrl}/ui/moban/非自然人客户受益所有人采集表.zip`"
                class="xizai"
                >下载模板及打印件</a
              >
              <!-- <el-button
                type="primary"
                size="small"
                @click="download('6')"
                icon="el-icon-download"
                style="float:left;margin:10px;margin-right:40px"
              >下载模板及打印件</el-button> -->
              <el-upload
                :limit="1"
                class="upload-demo"
                :action="action"
                :on-change="handleChangefeizi"
                :file-list="fileListfeizi"
                :on-success="upLoadPicfeizi"
                :on-remove="handleRemovefeizi"
                :headers="headers"
              >
                <el-button
                  size="small"
                  type="primary"
                  @click="downloadone('6')"
                  icon="el-icon-upload2"
                  style="float: right; margin: 10px"
                  >上传扫描件</el-button
                >
                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
              </el-upload>
            </div>
          </div>
        </el-form-item>
        <el-form-item
          label="单位税收居民声明文件:"
          label-width="160px"
          style="margin: 50px 0; margin-left: 40px"
          prop="danwei"
        >
          <div style="margin: 20px 0">
            <span style="color: red; font-size: 12px"
              >注:请按“模板”提示将“打印”件打印出来后填写，再上传扫描件。</span
            >
            <div>
              <!-- <el-button
                type="primary"
                size="small"
                @click="download('7')"
                icon="el-icon-download"
                style="float:left;margin:10px;margin-right:40px"
              >下载模板及打印件</el-button> -->
              <a
                :href="`${baseUrl}/ui/moban/单位税收居民声明文件.zip`"
                class="xizai"
                >下载模板及打印件</a
              >
              <el-upload
                :limit="1"
                class="upload-demo"
                :action="action"
                :on-change="handleChangedan"
                :file-list="fileListdan"
                :on-success="upLoadPicdan"
                :on-remove="handleRemovedan"
                :headers="headers"
              >
                <el-button
                  size="small"
                  type="primary"
                  @click="downloadone('7')"
                  icon="el-icon-upload2"
                  style="float: right; margin: 10px"
                  >上传扫描件</el-button
                >
                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div> -->
              </el-upload>
            </div>
          </div>
        </el-form-item>
      </el-form>

      <!-- 租金\收银 end -->

      <!-- <el-col :span="24" style="text-align: center;"> -->
      <el-button
        type="success"
        plain
        style="margin-top: 2px; margin-left: 400px"
        @click="saveCaogao()"
        v-if="this.$route.params.flagaddshop"
        >返回</el-button
      >
      <el-button
        type="success"
        style="margin-top: 2px"
        @click="postFormAjax()"
        v-if="this.$route.params.flagaddshop"
      >
        提交审核</el-button
      >
      <!-- </el-col> -->
    </div>
    <!-- <el-dialog :visible.sync="showMapComponent" @close="cancel" width="65%"> -->
    <!-- <div class="map">
        <el-input
          v-model="addressKeyword"
          placeholder="请输入地址来直接查找相关位置"
          clearable
          style="margin-bottom:20px"
          id="place"
        >
          <el-button slot="append" icon="el-icon-search" @click="getAddressKeyword"></el-button>
        </el-input>
        <div id="container" style="width:100%; height:300px"></div>
    </div>-->
    <!-- <p style="margin:5px">
        <input style="width:200px;padding:3px 4px;z-index:3000" type="text" id="place" />
      </p>
    <div id="container" style="width:800px;height:400px;z-index:3000"></div>-->

    <!-- <span slot="footer">
        <el-button icon="el-icon-close" @click="cancel">取 消</el-button>
        <el-button icon="el-icon-place" type="primary" @click="confirm">确 定</el-button>
    </span>-->
    <!-- </el-dialog> -->
  </div>
</template>

<script>
import {
  getAllZone,
  getAllBase,
  getBaseUserInfo,
  applyShop,
  phoneVerification,
  saveUserReviewInfo,
  queryUserIcbcTemp,
  uploadFile,
  editStore,
  queryUserStoreInfo,
  returnBack,
} from '@/api/addShopapply.js';
import {
  //   queryGoodsTypeList,
  //   addGoodsType,
  //   addLowerGoodsType,
  //   deleteGoodsType,
  //   updaterole,
  //   getUserOrgType
  qryReviewClerk,
  reviewClerkUpdate,
  reviewClerkDelete,
} from '@/api/shopMemberset';
import qs from 'qs';
import { shopAuthdetail } from '@/api/loginApi';
import VDistpicker from 'v-distpicker';
// import mapComponent from "@/components/mapComponent";
import imgSize from '@/utils/common';
import { dict } from '../../dict';

let map = null;
let marker = null;

export default {
  name: 'news',

  name: 'AddCaterMerchants',
  components: {
    VDistpicker,
  },
  updated: function() {
    this.updateCount = this.updateCount + 1;
    console.log(this.updateCount, 'kkt');
  },
  data() {
    return {
      /* 2021-02-22 店员姓名和身份证不允许修改 */
      salesclerkFlag: false,
      /*-----end------  */
      headers: {
        token: localStorage.getItem('token'), //从cookie里获取token，并赋值  Authorization ，而不是token
      },
      updateCount: 0,
      shopname: '',
      tableData: [],
      userType: '',
      txtVal: '',
      picUrl: '',
      loading: true,
      dialogVisibleorg: false,
      dialogVisibleorgone: false,
      imgListoneyuan: [],
      imgListtwo: [],
      ruleForm: {
        orgSeq: '',
        realName: '',
        onboardDate: '',
        workYear: '',
        academic: '',
        tel: '',
        status: '1',
        headPicUrl: '',
        idCard: '',
        isFullTime: '',
        sex: '',
      },
      orgSeqxia: '',
      orgList: {},
      flagdian: false,
      total: 0,
      options: [],
      optionsone: [],
      listQuery: {
        current: 1,
        size: 10,
      },
      orgSeq: '',
      flagorg: false,
      dialogVisible: false,
      flagdianyuanone: false,
      flagdianyuan: false,
      dialogVisibleImg: false,
      flagdianone: false,
      dialogImageUrl: '',
      formInline: {
        realName: '',
        workYear: '',
        academic: '',
        tel: '',
        status: '',
        idCard: '',
        sex: '',
        employeeNo: '',
      },
      orgList: [],
      userId: '',
      uuidyuan: '',
      dianyuanrules: {
        realName: [
          {
            required: true,
            message: '请输入店员姓名',
            trigger: 'blur',
          },
        ],
        onboardDate: [
          {
            required: true,
            message: '请输入上岗日期',
            trigger: 'blur',
          },
        ],
        workYear: [
          {
            required: true,
            message: '请输入工作年限',
            trigger: 'blur',
          },
        ],
        academic: [
          {
            required: true,
            message: '请选择学历',
            trigger: 'blur',
          },
        ],
        isFullTime: [
          {
            required: true,
            message: '请选择是否专职',
            trigger: 'blur',
          },
        ],
        sex: [
          {
            required: true,
            message: '请选择性别',
            trigger: 'blur',
          },
        ],
        status: [
          {
            required: true,
            message: '请选择状态',
            trigger: 'blur',
          },
        ],
        tel: [
          {
            required: true,
            message: '请输入手机号',
            trigger: 'blur',
          },
          {
            pattern: /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[0123456789])\d{8}$/,
            message: '请输入正确的手机号',
            trigger: 'blur',
          },
        ],
        idCard: [
          {
            required: true,
            message: '请输入身份证号码',
            trigger: 'blur',
          },

          {
            pattern: /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
            message: '请输入正确的身份证号',
            trigger: 'blur',
          },
        ],
        headPicUrl: [
          {
            required: true,
            message: '请上传图片',
            trigger: 'blur',
          },
        ],
      },

      action: `${process.env.VUE_APP_BASE_API}/api/file-service/v1/file/uploadFile`,
      baseUrl: process.env.VUE_APP_BASE_API,

      fileList: [],
      map: null,
      getAddress: null,
      getAddCode: null,
      addressKeyword: '',
      meridflag: true,
      meridflagone: false,
      dialogVisible1: false,
      dialogVisible2: false,
      dialogVisiblejie: false,
      dialogVisibleshenzheng: false,
      dialogVisibleshenfan: false,
      dialogImageUrljie: false,
      dialogVisible3: false,
      dialogVisible4: false,

      imgList: [],
      imgListone: [],
      imgListtwo: [],
      imgListthree: [],
      imgListjie: [],
      fileListfa: [],
      fileListxin: [],
      fileListshou: [],
      fileListfei: [],
      fileListdui: [],
      fileListfeizi: [],
      fileListdan: [],
      imgListjie: [],
      imgListshenzheng: [],
      imgListshenfan: [],
      data1: '',
      BMap: null, // 地图组件是否就绪
      showMapComponent: false,
      keyword: '', // 地区搜索的信息
      mapStyle: {
        width: '100%',
        height: this.mapHeight + 'px',
      },
      markersArray: [], //用来存储标注
      center: {
        lng: 116.404,
        lat: 39.915,
      },
      select: {
        province: '',
        city: '',
        area: '',
      },
      choosedLocation: {
        province: '',
        city: '',
        district: '',
        addr: '',
      },
      zoom: 15,
      active: 0, //步骤计数
      // 选择商户

      formCorp: {
        storeName: '',
        storeType: '', //店铺类型(1标准店、2精品店、3综合体验店)

        upOrgSeq: '',
        baseCode: '',
        // basePersonCode: "",
        baseName: '',
        basePersonName: '',
        managerArea: '',
        orderCustomerCode: '',
      },
      headers: {
        token: localStorage.getItem('token'),
      },
      rules: {
        storeName: [
          {
            required: true,
            message: '请输入店铺名称',
          },
        ],
        storeType: [
          {
            required: true,
            message: '请输入店铺类型',
          },
        ],
        upOrgSeq: [
          {
            required: true,
            message: '请选择所属大区',
          },
        ],
        baseName: [
          {
            required: true,
            message: '请选择所属营销区域',
          },
        ],
        // basePersonCode: [{ required: true, message: "请选择所属业务员" }],
        managerArea: [
          {
            required: true,
            message: '请输入经营面积',
          },
        ],
        orderCustomerCode: [
          {
            required: true,
            message: '请输入订单客户编号',
          },
        ],
      },
      corpDetails: {}, //商家详情
      corpList: [], //商户列表
      Renarr: [],
      // 选择商户 end
      // 文件
      //   dialogVisible: false,
      dialogImageUrl: '',
      dialogImageUrl1: '',
      dialogImageUrl2: '',
      dialogImageUrl3: '',
      dialogImageUrlshenzheng: '',
      dialogImageUrlshenfan: '',

      // /文件
      // 店铺信息
      formShop: {
        openDate: '', //经营状态
        province: '', //租赁时间 开业时间
        city: '',
        area: '',
        storeAddressDetail: '',
        storeLng: '',
        storeLat: '',
        companyName: '',
        shopHours: '',
        value1: '9:00',
        value2: '21:00',
      },
      openTime: [],
      shopRules: {
        openDate: [
          {
            required: true,
            message: '请输入开业日期',
          },
        ],
        province: [
          {
            required: true,
            message: '请输入所属省份',
          },
        ],
        city: [
          {
            required: true,
            message: '请输入所属城市',
          },
        ],
        storeAddressDetail: [
          {
            required: true,
            message: '请输入店铺详细地址',
          },
        ],
        storeLng: [
          {
            required: true,
            message: '请获取经度',
          },
        ],
        storeLat: [
          {
            required: true,
            message: '请获取纬度',
          },
        ],
        companyName: [
          {
            required: true,
            message: '请输入经销商名',
          },
        ],
        //shopHours: [{ required: true, message: "请输入营业时间" }]
        value1: [
          {
            required: true,
            message: '请输入营业开始时间',
          },
        ],
        value2: [
          {
            required: true,
            message: '请输入营业结束时间',
          },
        ],
      },
      // 星期
      checkAllWeek: false,
      authCode: '',
      isIndeterminate: true,
      mainuuid: '',
      week: [
        {
          weekNum: 1,
          weekName: '星期一',
        },
        {
          weekNum: 2,
          weekName: '星期二',
        },
        {
          weekNum: 3,
          weekName: '星期三',
        },
        {
          weekNum: 4,
          weekName: '星期四',
        },
        {
          weekNum: 5,
          weekName: '星期五',
        },
        {
          weekNum: 6,
          weekName: '星期六',
        },
        {
          weekNum: 0,
          weekName: '星期天',
        },
      ],
      // 每日时间
      DateTime: [
        {
          value: '1',
          label: '每日营业时间一致',
        },
      ],
      // 店铺信息
      // 店铺展示
      formShopShow: {
        legalPerson: '',
        legalPersonPhone: '',
        storeOwnerName: '',
        storeOwnerPhone: '',
        storePhone: '',
        storeOwnerGrade: '',
        storeManagerPhone: '',
        storeManagerName: '',

        storeOwnerPic: '',
        storeManagerPic: '',
      },
      shopShowRules: {
        legalPerson: [
          {
            required: true,
            message: '请输入法人代表',
          },
        ],
        legalPersonPhone: [
          {
            required: true,
            message: '请输入法人手机号',
          },
          {
            pattern: /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[0123456789])\d{8}$/,
            message: '请输入正确的手机号',
            trigger: 'blur',
          },
        ],
        storeOwnerName: [
          {
            required: true,
            message: '请输入店主姓名',
          },
        ],
        storeOwnerPhone: [
          {
            required: true,
            message: '请输入店主手机号',
            trigger: 'blur',
          },
          {
            pattern: /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[0123456789])\d{8}$/,
            message: '请输入正确的手机号',
            trigger: 'blur',
          },
        ],
        storePhone: [
          {
            required: true,
            message: '请输入店铺电话',
          },
          //   {
          //     pattern: /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/,
          //     message: "请输入正确的手机号",
          //     trigger: "blur"
          //   }
        ],
        storeOwnerGrade: [
          {
            required: true,
            message: '请输入店铺评级',
          },
        ],
        storeManagerPhone: [
          {
            required: true,
            message: '请输入店长电话',
          },
          {
            pattern: /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[0123456789])\d{8}$/,
            message: '请输入正确的手机号',
            trigger: 'blur',
          },
        ],
        storeManagerName: [
          {
            required: true,
            message: '请输入店长姓名',
          },
        ],

        storeOwnerPic: [
          {
            required: true,
            message: '请输入店主照片',
          },
        ],
        storeManagerPic: [
          {
            required: true,
            message: '请输入店长照片',
          },
        ],
      },
      dialogRecmdProducts: false,
      // 店铺展示show end
      // 租金\收银
      fileTempId: '',
      fileScanningCopy: '',
      formRental: {
        isIcbc: '',
        businessLicense: '',
        doorwayPic: '',
        frontCard: '',

        backCard: '',
        settlementPic: '',
        merid: '',
        agreement: '',
        wechatId: '',
      },
      icbcstatus: '',
      fileTypearr: [],
      userIcbcFilingDTOList: [],
      RentalRules: {
        isIcbc: [
          {
            required: true,
            message: '请选择是否有工行对公账户',
          },
        ],
        frontCard: [
          {
            required: true,
            message: '请输入法人身份证正面照片',
          },
        ],
        backCard: [
          {
            required: true,
            message: '请输入法人身份证背面照片',
          },
        ],

        doorwayPic: [
          {
            required: true,
            message: '请输入门头照片',
          },
        ],
        businessLicense: [
          {
            required: true,
            message: '请输入营业执照',
          },
        ],
        settlementPic: [
          {
            required: true,
            message: '请输入结算账号照片',
          },
        ],
        fading: [
          {
            required: true,
            message: '请上传法定代表人授权书',
          },
        ],
        xinxi: [
          {
            required: true,
            message: '请上传信息查询使用授权书',
          },
        ],
        shoudan: [
          {
            required: true,
            message: '请上传收单业务书',
          },
        ],
        feijin: [
          {
            required: true,
            message: '请上传法定代表人授权书',
          },
        ],
        duigong: [
          {
            required: true,
            message: '请上传非金融企业划型信息采集表',
          },
        ],
        feizi: [
          {
            required: true,
            message: '请上传对公客户信息采集表',
          },
        ],
        danwei: [
          {
            required: true,
            message: '请上传非自然人客户受益所有人采集表',
          },
        ],
      },
      RentalPayWay: [],
      // 租金\收银 end

      // 腾讯地图的大版本升级后的参数
      suggestion: '',
      suggestionLoading: false,
      suggestionList: [],
    };
  },
  watch: {
    dialogVisible: function(currentValue) {
      this.showMapComponent = currentValue;

      if (currentValue) {
        this.keyword = '';
      }
    },
  },
  computed: {
    storeType: () => dict.storeType,
  },
  watch: {
    showModal: function(newValue) {
      if (newValue) {
        this.init();
      }
    },
    // upOrgSeq: function() {

    //     console.log(this.formCorp.upOrgSeq,"opopo");
    //     this.selCore(this.formCorp.upOrgSeq);
    // }
    'formCorp.upOrgSeq': {
      handler(newName, oldName) {
        // ...

        console.log(this.formCorp.upOrgSeq, 'opopo');
        this.selCore(this.formCorp.upOrgSeq);
      },
      deep: true,
      immediate: true,
    },
  },
  mounted() {
    console.log(this.$route.params.authCode, 'llll');
    localStorage.setItem('authCode', this.$route.params.authCode);
    // if(this.$route.params.v.userIcbcFilingDTOList==[]||this.$route.params.v.userIcbcFilingDTOList==null){
    //     this.meridflag=false
    //     this.meridflagone=true
    // }else{
    //       this.meridflag=true
    //     this.meridflagone=false
    // }
    this.getdetail();
    this._getAllZone();
    this.init();
    console.log(this.formCorp.upOrgSeq, '999');
    //     this.mainuuid = this.$route.params.v.uuid;
    //     this.authCode = this.$route.params.v.authCode;
    //     this.formCorp.storeName = this.$route.params.v.storeName;
    //     this.formCorp.storeType = String(this.$route.params.v.storeType);
    //     this.formCorp.upOrgSeq = String(this.$route.params.v.upOrgSeq);
    //     this.formCorp.baseCode = String(this.$route.params.v.baseCode);
    //     this.formCorp.baseName = this.$route.params.v.baseName;
    //     this.formCorp.basePersonCode = String(this.$route.params.v.basePersonCode);
    //     this.formCorp.basePersonName = this.$route.params.v.basePersonName;
    //     this.formShop.openDate = this.$route.params.v.openDate;
    //     this.formShop.province = this.$route.params.v.province;
    //     this.formShop.city = this.$route.params.v.city;
    //     this.select.province = this.$route.params.v.province;
    //     this.select.city = this.$route.params.v.city;
    //     this.formShop.storeAddressDetail = this.$route.params.v.storeAddressDetail;
    //     this.formShop.storeLng = this.$route.params.v.storeLng;
    //     this.formShop.storeLat = this.$route.params.v.storeLat;
    //   localStorage.setItem("storeLng",  this.formShop.storeLng);
    //         localStorage.setItem("storeLat", this.formShop.storeLat);
    //     this.formShop.companyName = this.$route.params.v.companyName;
    //     this.formShop.value1 = this.$route.params.v.openBeginTime;
    //     this.formShop.value2 = this.$route.params.v.openEndTime;

    //     this.formShopShow.legalPerson = this.$route.params.v.legalPerson;
    //     this.formShopShow.legalPersonPhone = this.$route.params.v.legalPersonPhone;
    //     this.formShopShow.storeOwnerName = this.$route.params.v.storeOwnerName;

    //     this.formShopShow.storeOwnerPhone = this.$route.params.v.storeOwnerPhone;
    //     this.formShopShow.storePhone = this.$route.params.v.storePhone;
    //     this.formShopShow.storeOwnerGrade = this.$route.params.v.storeOwnerGrade;
    //     this.formShopShow.storeManagerPhone = this.$route.params.v.storeManagerPhone;
    //     this.formShopShow.storeManagerName = this.$route.params.v.storeManagerName;
    //     this.formShopShow.storeOwnerPic = this.$route.params.v.storeOwnerPic;
    //     this.formShopShow.storeManagerPic = this.$route.params.v.storeManagerPic;

    //     this.formRental.isIcbc = String(this.$route.params.v.isIcbc);
    //     this.formRental.businessLicense = this.$route.params.v.businessLicense;
    //     this.formRental.doorwayPic = this.$route.params.v.doorwayPic;
    //     this.formRental.backCard = this.$route.params.v.backCard;
    //     this.formRental.frontCard = this.$route.params.v.frontCard;

    //     this.formRental.settlementPic = this.$route.params.v.settlementPic;

    //     this.userIcbcFilingDTOList = this.$route.params.v.userIcbcFilingDTOList;

    //    if (this.formRental.businessLicense !== "") {
    //             this.imgList.push({
    //               url: this.formRental.businessLicense,
    //               status: "finished"
    //             }); //上传成功之后把值添加到imglist中
    //           }
    //           if (this.formRental.doorwayPic !== "") {
    //             this.imgListone.push({
    //               url: this.formRental.doorwayPic,
    //               status: "finished"
    //             }); //上传成功之后把值添加到imglist中
    //           }
    //           if (this.formShopShow.storeOwnerPic !== "") {
    //             this.imgListtwo.push({
    //               url: this.formShopShow.storeOwnerPic,
    //               status: "finished"
    //             }); //上传成功之后把值添加到imglist中
    //           }

    //           if (this.formShopShow.storeManagerPic !== "") {
    //             this.imgListthree.push({
    //               url: this.formShopShow.storeManagerPic,
    //               status: "finished"
    //             }); //上传成功之后把值添加到imglist中
    //           }
    //           if (this.formRental.frontCard !== "") {
    //             this.imgListshenzheng.push({
    //               url: this.formRental.frontCard,
    //               status: "finished"
    //             }); //上传成功之后把值添加到imglist中
    //           }
    //           if (this.formRental.backCard !== "") {
    //             this.imgListshenfan.push({
    //               url: this.formRental.backCard,
    //               status: "finished"
    //             }); //上传成功之后把值添加到imglist中
    //           }

    //           if (this.formRental.settlementPic !== "") {
    //             this.imgListjie.push({
    //               url: this.formRental.settlementPic,
    //               status: "finished"
    //             }); //上传成功之后把值添加到imglist中
    //           }

    // this.userIcbcFilingDTOList.forEach((item, i) => {
    //   if (item.fileType == 1) {
    //     this.fileListfa.push({
    //       url: item.fileScanningCopy,
    //       status: "finished"
    //     });
    //   }
    //   if (item.fileType == 2) {
    //     this.fileListxin.push({
    //       url: item.fileScanningCopy,
    //       status: "finished"
    //     });
    //   }
    //   if (item.fileType == 3) {
    //     this.fileListshou.push({
    //       url: item.fileScanningCopy,
    //       status: "finished"
    //     });
    //   }
    //   if (item.fileType == 4) {
    //     this.fileListfei.push({
    //       url: item.fileScanningCopy,
    //       status: "finished"
    //     });
    //   }
    //   if (item.fileType == 5) {
    //     this.fileListdui.push({
    //       url: item.fileScanningCopy,
    //       status: "finished"
    //     });
    //   }
    //   if (item.fileType == 6) {
    //     this.fileListfeizi.push({
    //       url: item.fileScanningCopy,
    //       status: "finished"
    //     });
    //   }
    //   if (item.fileType == 7) {
    //     this.fileListdan.push({
    //       url: item.fileScanningCopy,
    //       status: "finished"
    //     });
    //   }
    // });
    // this._shopAuthdetail();
    //  this.logininfo = localStorage.getItem("logininfo");
    // this.orgSeq = JSON.parse(this.logininfo).orgSeq;

    // this.orgList = JSON.parse(this.logininfo).orgList;

    //   this.orgList.forEach((item,i)=>{
    //     if(this.orgList[i].userType==4||this.orgList[i].userType==5){
    //         this.flagdian=true;
    //           this.flagdianyuan=false;
    //       this.flagdianyuanone=true
    //     }else{
    //       this.flagdianyuan=true;
    //         this.flagdianyuanone=false;
    //     }
    // if(this.orgList[i].userType==6){
    //     this.flagdianyuan=true;
    //     this.flagdianyuanone=false;
    // }else{
    //   this.flagdianyuan=false;
    //   this.flagdianyuanone=true
    // }

    // })
    // console.log(this.flagdian,this.flagdianyuan,"kiki")
  },

  methods: {
    getdetail() {
      let data = {
        uuid: this.$route.params.v.uuid,
      };
      queryUserStoreInfo(data).then((res) => {
        console.log(res);
        this.$route.params.v = res.result;
        //   this.formCorp.storeName = this.$route.params.v.storeName;
        //   this.formCorp.updateTime = this.$route.params.v.updateTime;
        //   this.formCorp.storeType = String(this.$route.params.v.storeType);
        //   this.formCorp.managerArea = this.$route.params.v.managerArea;
        //   this.formCorp.buildingArea = this.$route.params.v.buildingArea;
        //   this.formCorp.practicalArea = this.$route.params.v.practicalArea;
        //   this.formCorp.leaseholdArea = this.$route.params.v.leaseholdArea;
        //   this.formCorp.warehouseArea = this.$route.params.v.warehouseArea;
        //   this.formCorp.leaseholdArea = this.$route.params.v.leaseholdArea;
        //   this.formCorp.businessLicense = this.$route.params.v.businessLicense;
        //   this.formCorp.storeCode = this.$route.params.v.storeCode;
        //   this.formCorp.createTime = this.$route.params.v.createTime;
        //   //   this.imgList.push(this.formCorp.businessLicense);

        //   console.log(this.imgList, "opop");
        //   this.formShop.openDate = this.$route.params.v.openDate;
        //   this.formShop.province = this.$route.params.v.province;
        //   this.formShop.city = this.$route.params.v.city;
        //   this.formShop.storeAddressDetail = this.$route.params.v.storeAddressDetail;
        //   // storeLng: this.formShop.storeLng,
        //   // storeLat: this.formShop.storeLat,
        //   this.formShop.storeLng = this.$route.params.v.storeLng;
        //   this.formShop.storeLat = this.$route.params.v.storeLat;
        //   this.formShop.companyName = this.$route.params.v.companyName;
        //   this.formShop.openBeginTime = this.$route.params.v.openBeginTime;
        //   this.formShop.value1 = this.$route.params.v.openBeginTime;
        //   this.formShop.openEndTime = this.$route.params.v.openEndTime;
        //   this.formShop.value2 = this.$route.params.v.openEndTime;

        //   this.formShopShow.legalPerson = this.$route.params.v.legalPerson;
        //   this.formShopShow.legalPersonPhone = this.$route.params.v.legalPersonPhone;
        //   this.formShopShow.storeOwnerName = this.$route.params.v.storeOwnerName;
        //   this.formShopShow.storeOwnerPhone = this.$route.params.v.storeOwnerPhone;
        //   this.formShopShow.storePhone = this.$route.params.v.storePhone;
        //   this.formShopShow.storeOwnerGrade = this.$route.params.v.storeOwnerGrade;
        //   this.formShopShow.storeManagerPhone = this.$route.params.v.storeManagerPhone;
        //   this.formShopShow.storeManagerName = this.$route.params.v.storeManagerName;
        //   this.formShopShow.doorwayPic = this.$route.params.v.doorwayPic;
        //   this.formShopShow.storeOwnerPic = this.$route.params.v.storeOwnerPic;
        //   this.formShopShow.storeManagerPic = this.$route.params.v.storeManagerPic;
        //   this.formRental.upOrgZone = this.$route.params.v.upOrgZone;
        //   this.formRental.baseName = this.$route.params.v.baseName;
        //   this.formRental.baseCode = this.$route.params.v.baseCode;

        //   this.formRental.basePersonCode = this.$route.params.v.basePersonCode;
        //   this.formRental.basePersonName = this.$route.params.v.basePersonName;
        //   this.formRental.isIcbc = this.$route.params.v.isIcbc;

        //   this.formRental.doorwayPic = this.$route.params.v.doorwayPic;
        //   this.formRental.frontCard = this.$route.params.v.frontCard;
        //   this.formRental.backCard = this.$route.params.v.backCard;
        //   this.formRental.settlementPic = this.$route.params.v.settlementPic;
        this.mainuuid = this.$route.params.v.uuid;
        this.authCode = this.$route.params.v.authCode;
        this.orgSeq = this.$route.params.v.orgSeq;
        this.formCorp.storeName = this.$route.params.v.storeName;
        this.formCorp.storeType = this.$route.params.v.storeType;
        this.formCorp.upOrgSeq = String(this.$route.params.v.upOrgSeq);
        this.formCorp.baseCode = String(this.$route.params.v.baseCode);
        this.formCorp.baseName = this.$route.params.v.baseName;
        this.formCorp.managerArea = this.$route.params.v.managerArea;
        this.formCorp.orderCustomerCode = this.$route.params.v.orderCustomerCode;
        // this.formCorp.basePersonCode = String(this.$route.params.v.basePersonCode);
        this.formCorp.basePersonName = this.$route.params.v.basePersonName;
        this.formShop.openDate = this.$route.params.v.openDate;
        this.formShop.province = this.$route.params.v.province;
        this.formShop.city = this.$route.params.v.city;
        this.formShop.area = this.$route.params.v.county;
        this.select.province = this.$route.params.v.province;

        this.select.city = this.$route.params.v.city;
        this.select.area = this.$route.params.v.county;
        console.log(this.select.province, this.select.city, '252');
        this.formShop.storeAddressDetail = this.$route.params.v.storeAddressDetail;
        this.formShop.storeLng = this.$route.params.v.storeLng;
        this.formShop.storeLat = this.$route.params.v.storeLat;
        localStorage.setItem('storeLng', this.formShop.storeLng);
        localStorage.setItem('storeLat', this.formShop.storeLat);
        this.formShop.companyName = this.$route.params.v.companyName;
        this.formShop.value1 = this.$route.params.v.openBeginTime;
        this.formShop.value2 = this.$route.params.v.openEndTime;

        this.formShopShow.legalPerson = this.$route.params.v.legalPerson;
        this.formShopShow.legalPersonPhone = this.$route.params.v.legalPersonPhone;
        this.formShopShow.storeOwnerName = this.$route.params.v.storeOwnerName;

        this.formShopShow.storeOwnerPhone = this.$route.params.v.storeOwnerPhone;
        this.formShopShow.storePhone = this.$route.params.v.storePhone;
        this.formShopShow.storeOwnerGrade = this.$route.params.v.storeOwnerGrade;
        this.formShopShow.storeManagerPhone = this.$route.params.v.storeManagerPhone;
        this.formShopShow.storeManagerName = this.$route.params.v.storeManagerName;
        this.formShopShow.storeOwnerPic = this.$route.params.v.storeOwnerPic;
        this.formShopShow.storeManagerPic = this.$route.params.v.storeManagerPic;
        this.formRental.merid = this.$route.params.v.merid;
        this.formRental.agreement = this.$route.params.v.agreement;
        this.formRental.wechatId = this.$route.params.v.wechatId;
        this.rolemanageone();
        //      this.formRental.isIcbc =String(this.$route.params.v.isIcbc);
        //            this.isIcbc = String(this.$route.params.v.isIcbc);
        //        if (this.formRental.isIcbc == 0) {
        //         this.RentalRules.fading[0].required = true;
        //         this.RentalRules.xinxi[0].required = true;
        //         this.RentalRules.shoudan[0].required = true;
        //         this.RentalRules.feijin[0].required = true;
        //         this.RentalRules.duigong[0].required = true;
        //         this.RentalRules.feizi[0].required = true;
        //         this.RentalRules.danwei[0].required = true;
        //       } else if (this.formRental.isIcbc == 1) {
        //           this.RentalRules.fading[0].required = true;
        //         this.RentalRules.xinxi[0].required = true;
        //         this.RentalRules.shoudan[0].required = true;
        //         this.RentalRules.feijin[0].required = false;
        //         this.RentalRules.duigong[0].required = false;
        //         this.RentalRules.feizi[0].required = false;
        //         this.RentalRules.danwei[0].required = false;
        //       }
        //        this.formRental.merid =this.$route.params.v.merid;
        //          this.formRental.agreement =this.$route.params.v.agreement;
        //            this.formRental.wechatId =this.$route.params.v.wechatId;
        //    console.log(this.formRental.isIcbc,"9898")
        // //
        //    if(this.formRental.isIcbc=="null"){
        //       this.formRental.isIcbc = "0"
        //    }else{
        //        this.formRental.isIcbc =String(this.$route.params.v.isIcbc);
        //    }
        //     this.formRental.businessLicense = this.$route.params.v.businessLicense;
        //     this.formRental.doorwayPic = this.$route.params.v.doorwayPic;
        //     this.formRental.backCard = this.$route.params.v.backCard;
        //     this.formRental.frontCard = this.$route.params.v.frontCard;

        //     this.formRental.settlementPic = this.$route.params.v.settlementPic;

        //     this.userIcbcFilingDTOList = this.$route.params.v.userIcbcFilingDTOList;

        //    if (this.formRental.businessLicense !== ""&&this.formRental.businessLicense  !== null) {
        //             this.imgList.push({
        //               url: this.formRental.businessLicense,
        //               status: "finished"
        //             }); //上传成功之后把值添加到imglist中
        //           }
        //           if (this.formRental.doorwayPic !== ""&&this.formRental.doorwayPic !== null) {
        //             this.imgListone.push({
        //               url: this.formRental.doorwayPic,
        //               status: "finished"
        //             }); //上传成功之后把值添加到imglist中
        //           }
        if (
          this.formShopShow.storeOwnerPic !== '' &&
          this.formShopShow.storeOwnerPic !== null
        ) {
          this.imgListtwo.push({
            url: this.formShopShow.storeOwnerPic,
            status: 'finished',
          }); //上传成功之后把值添加到imglist中
        }

        if (
          this.formShopShow.storeManagerPic !== '' &&
          this.formShopShow.storeManagerPic !== null
        ) {
          this.imgListthree.push({
            url: this.formShopShow.storeManagerPic,
            status: 'finished',
          }); //上传成功之后把值添加到imglist中
        }
        //           if (this.formRental.frontCard !== ""&&this.formRental.frontCard !== null) {
        //             this.imgListshenzheng.push({
        //               url: this.formRental.frontCard,
        //               status: "finished"
        //             }); //上传成功之后把值添加到imglist中
        //           }
        //           if (this.formRental.backCard !== ""&&this.formRental.backCard !== null) {
        //             this.imgListshenfan.push({
        //               url: this.formRental.backCard,
        //               status: "finished"
        //             }); //上传成功之后把值添加到imglist中
        //           }

        //           if (this.formRental.settlementPic !== ""&&this.formRental.settlementPic !== null) {
        //             this.imgListjie.push({
        //               url: this.formRental.settlementPic,
        //               status: "finished"
        //             }); //上传成功之后把值添加到imglist中
        //           }
        //     this.userIcbcFilingDTOList.forEach((item, i) => {
        //       if (item.fileType == 1) {
        //         this.fileListfa.push({
        //           url: item.fileScanningCopy,
        //           status: "finished"
        //         });
        //       }
        //       if (item.fileType == 2) {
        //         this.fileListxin.push({
        //           url: item.fileScanningCopy,
        //           status: "finished"
        //         });
        //       }
        //       if (item.fileType == 3) {
        //         this.fileListshou.push({
        //           url: item.fileScanningCopy,
        //           status: "finished"
        //         });
        //       }
        //       if (item.fileType == 4) {
        //         this.fileListfei.push({
        //           url: item.fileScanningCopy,
        //           status: "finished"
        //         });
        //       }
        //       if (item.fileType == 5) {
        //         this.fileListdui.push({
        //           url: item.fileScanningCopy,
        //           status: "finished"
        //         });
        //       }
        //       if (item.fileType == 6) {
        //         this.fileListfeizi.push({
        //           url: item.fileScanningCopy,
        //           status: "finished"
        //         });
        //       }
        //       if (item.fileType == 7) {
        //         this.fileListdan.push({
        //           url: item.fileScanningCopy,
        //           status: "finished"
        //         });
        //       }
        //     });
      });
    },

    changekaishi(v) {
      console.log(v, 'hh');
      this.formShop.value1 = v;
    },
    changejieshu(v) {
      console.log(v, 'hh');
      this.formShop.value2 = v;
    },
    // _shopAuthdetail() {
    //   this.authCode = localStorage.getItem("authCode");
    //   let data = { authCode: this.authCode };
    //   shopAuthdetail(data).then(res => {

    //   });
    // },
    tublur(query) {
      const _this = this;

      if (query) {
        _this.suggestionLoading = true;
        var suggest = new TMap.service.Suggestion({
          pageSize: 10,
          region: `${_this.select.province}${_this.select.city}${_this.select.area}`,
        });

        suggest
          .getSuggestions({
            keyword: query,
          })
          .then((result) => {
            _this.suggestionList = result.data;
          })
          .finally(() => {
            _this.suggestionLoading = false;
          });
      } else {
        _this.suggestionList = [];
      }
    },
    onSelectAddress(value) {
      const curItem = this.suggestionList.find((item) => item.id === value);
      if (curItem) {
        marker && marker.setMap(null);
        marker = null;
        map.setCenter(
          new TMap.LatLng(curItem.location.lat, curItem.location.lng)
        );
        marker = new TMap.MultiMarker({
          map: map,
          geometries: [
            {
              position: new TMap.LatLng(
                curItem.location.lat,
                curItem.location.lng
              ),
            },
          ],
        });
        localStorage.setItem('storeLng', curItem.location.lng);
        localStorage.setItem('storeLat', curItem.location.lat);
        this.clicktu();
        localStorage.setItem('storeAddressDetail', curItem.address);
        this.formShop.storeAddressDetail = curItem.address;
      }
    },
    clicktu() {
      this.formShop.storeLng = localStorage.getItem('storeLng');
      this.formShop.storeLat = localStorage.getItem('storeLat');
    },
    saveCaogao() {
      console.log(this.updateCount, 'kkrt');
      if (this.updateCount > 6) {
        this.$confirm('变更内容是否提交审核？')
          .then((_) => {
            //  this.$router.push("/shopArchives");
            this.postFormAjaxone();
          })
          .catch((_) => {
            this.postFormAjaxquxiao();
          });
      } else {
        this.$router.push('/shopArchives');
      }
    },
    handleChangefa(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChangexin(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChangeshou(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChangefei(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChangedui(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChangefeizi(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChangedan(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');

      //   this.fileScanningCopy=
    },
    handleChange(file, fileList) {
      this.fileList = fileList.slice(-3);
      console.log(this.fileList, 'pop0');
      //   this.fileScanningCopy=
    },
    download(tempType) {
      console.log(tempType, '999');
      let data = {
        type: tempType,
      };
      queryUserIcbcTemp(data).then((res) => {
        if (tempType == 1 || tempType == 2 || tempType == 3) {
          window.location.href = res.result[0].printUrl;

          var divFrame = window.parent.document.getElementById(
            'downLoadListFrame'
          );
          //判断是否存在，如果存在先移除，再重新创建
          if (divFrame != null) {
            window.parent.document.body.removeChild(divFrame);
          }
          //重新创建
          var iframe = window.parent.document.createElement('iframe');
          iframe.setAttribute('id', 'downLoadListFrame');
          //download_file.id = "downFrame";
          window.parent.document.body.appendChild(iframe);
          divFrame = window.parent.document.getElementById('downLoadListFrame');
          //隐式调用，（注意：window.parent.document 适应对于，farme内部代码，调用frame 外部dom；如果项目未用frame，改写成 document即可）
          window.open(res.result[0].tempUrl);
          divFrame.style.display = 'none';
        } else if (
          tempType == 6 ||
          tempType == 7 ||
          tempType == 4 ||
          tempType == 5
        ) {
          window.open(res.result[0].printUrl, 'one');
          window.open(res.result[0].tempUrl, 'two');
        }
      });
    },
    fileUpload(event) {
      //?上传文件
      console.log(event);

      let file = event.target.files;
      console.log(file, 'kkk');
      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', file[0]);
      console.log(formData);

      uploadFile(formData).then((res) => {
        console.log(res);

        this.$message({
          message: '保存成功',
          type: 'success',
          center: true,
        });
      });
      uploadFile(formData).then((res) => {
        console.log(res);

        this.$message({
          message: '保存成功',
          type: 'success',
          center: true,
        });
      });
    },
    downloadone(tempType) {
      //   this.fileUpload();
      console.log(tempType, '999');
      this.fileType = tempType;
      let data = {
        type: tempType,
      };
      queryUserIcbcTemp(data).then((res) => {
        this.fileTempId = res.result[0].uuid;
      });
    },

    //删除图片
    // checkshopphone(v) {
    //   console.log(v, "898");
    //   let data = {
    //     phone: v,
    //     type: 4
    //   };
    //   phoneVerification(data).then(res => {
    //     if (res.code == 0) {
    //       this.$message({
    //         message: res.message,
    //         type: "error",
    //         center: true
    //       });
    //       this.formShopShow.storeOwnerPhone = "";
    //     }
    //   });
    // },
    // checkshopphoneone(v) {
    //   console.log(v, "898");
    //   let data = {
    //     phone: v,
    //     type: 5
    //   };
    //   phoneVerification(data).then(res => {
    //     if (res.code == 0) {
    //       this.$message({
    //         message: res.message,
    //         type: "error",
    //         center: true
    //       });
    //       this.formShopShow.storeManagerPhone = "";
    //     }
    //   });
    //   if (
    //     this.formShopShow.storeManagerPhone == this.formShopShow.storeOwnerPhone
    //   ) {
    //     this.$message({
    //       message: "店长店主号码不能重复",
    //       type: "error",
    //       center: true
    //     });
    //     this.formShopShow.storeManagerPhone = "";
    //   }
    // },
    // init() {
    //   var that = this;
    //   maps.init("W3YBZ-NW734-APUUL-XQTC4-76L2T-NCF70", () => {
    //     var myLatlng = new qq.maps.LatLng(
    //       22.547931568083015,
    //       114.1306221485138
    //     );
    //     var myOptions = {
    //       zoom: 16,
    //       center: myLatlng,
    //       mapTypeId: qq.maps.MapTypeId.ROADMAP
    //     };
    //     that.map = new qq.maps.Map(
    //       document.getElementById("container"),
    //       myOptions
    //     );
    //     //获取点击后的地址

    //     qq.maps.event.addListener(that.map, "click", function(event) {
    //       var latLng = event.latLng,
    //         lat = latLng.getLat().toFixed(5),
    //         lng = latLng.getLng().toFixed(5);

    //       //   document.getElementById("latLng").innerHTML = lat + "," + lng;
    //       console.log(lng, "ppp");
    //       localStorage.setItem("storeLng", lng);
    //       localStorage.setItem("storeLat", lat);
    //       // this.formShop.storeLng = lng;
    //       // this.formShop.storeLat = lat;
    //     });
    //     //调用地址显示地图位置并设置地址
    //     that.getAddress = new qq.maps.Geocoder({
    //       complete: function(result) {
    //         that.map.setCenter(result.detail.location);
    //         console.log(result.detail.location);
    //         that.shopInfo.lng = result.detail.location.lng;
    //         that.shopInfo.lat = result.detail.location.lat;
    //         var marker = new qq.maps.Marker({
    //           map: that.map,
    //           position: result.detail.location
    //         });
    //       }
    //     });
    //     //通过坐标来显示地图地址
    //     that.getAddCode = new qq.maps.Geocoder({
    //       complete: function(result) {
    //         that.addressKeyword = result.detail.address;
    //       }
    //     });
    //   });
    // },
    // getAddressKeyword() {
    //   //通过getLocation();方法获取位置信息值
    //   this.getAddress.getLocation(this.addressKeyword);
    // },
    // // 通过坐标获得地址
    // getAddressCode() {
    //   var lat = parseFloat(this.shopInfo.lat);
    //   var lng = parseFloat(this.shopInfo.lng);
    //   var latLng = new qq.maps.LatLng(lat, lng);
    //   //调用获取位置方法
    //   this.getAddCode.getAddress(latLng);
    // },
    init() {
      var that = this;
      console.log(that.formShop.storeLng, 'kjuu');
      console.log(localStorage.getItem('storeLng'), 'lll99');
      console.log(localStorage.getItem('storeLat'), 'lll99');

      if (
        localStorage.getItem('storeLat') == '' ||
        localStorage.getItem('storeLng') == ''
      ) {
        map = new TMap.Map(document.getElementById('container'), {
          center: new TMap.LatLng(28.80807357698725, 104.59505796432495),
          minZoom: 15, //此处设置地图的缩放级别  最小值是6
          maxZoom: 50,
          zoom: 17,
        });
      } else {
        map = new TMap.Map(document.getElementById('container'), {
          center: new TMap.LatLng(
            localStorage.getItem('storeLat'),
            localStorage.getItem('storeLng')
          ),
          minZoom: 15, //此处设置地图的缩放级别  最小值是6
          maxZoom: 50,
          zoom: 17,
        });
        var myLatlng = new TMap.LatLng(
          localStorage.getItem('storeLat'),
          localStorage.getItem('storeLng')
        );
        marker = new TMap.MultiMarker({
          map: map,
        });
        marker.add({
          position: myLatlng,
        });
        that.markersArray.push(marker);
      }
      map.on('click', function(evt) {
        var geocoder = new TMap.service.Geocoder();
        geocoder.getAddress({ location: evt.latLng }).then((res) => {
          localStorage.setItem('storeAddressDetail', res.result.address);
          that.formShop.storeAddressDetail = res.result.address;
        });
        marker && marker.setMap(null);
        marker = null;
        marker = new TMap.MultiMarker({
          map: map,
        });
        if (marker) {
          marker.add({
            position: evt.latLng,
          });
        }
        localStorage.setItem('storeLng', evt.latLng.getLng());
        localStorage.setItem('storeLat', evt.latLng.getLat());
        that.clicktu();
      });
    },
    onSelected(data) {
      console.log(data.province.value, 'ppp');
      this.formShop.province = data.province.value;
      this.formShop.city = data.city.value;
      this.formShop.area = data.area.value;
      //   this.address.county = data.area.value;
    },
    goback() {
      if (this.updateCount > 6) {
        this.$confirm('变更内容是否提交审核？')
          .then((_) => {
            //  this.$router.push("/shopArchives");
            this.postFormAjaxone();
          })
          .catch((_) => {
            this.postFormAjaxquxiao();
          });
      } else {
        this.$router.push('/shopArchives');
      }
    },
    handleRemove(file, fileList) {
      console.log(file, fileList);
      console.log(this.userIcbcFilingDTOList, '78999');
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 8) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      console.log(this.userIcbcFilingDTOList, '78111');
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgList = newfileList;
    },
    handleRemoveone(file, fileList) {
      console.log(file, fileList);
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 9) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      console.log(this.userIcbcFilingDTOList, 'ii9955');
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgListone = newfileList;
    },
    handleRemovejie(file, fileList) {
      console.log(file, fileList);
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 12) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      console.log(this.userIcbcFilingDTOList, '8899');
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgListjie = newfileList;
    },

    handleRemovefa(file, fileList) {
      console.log('555');
      console.log(file, fileList);
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 1),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 1) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListfa = newfileList;
    },
    handleRemovexin(file, fileList) {
      console.log('555');
      console.log(file, fileList);
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 2),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 2) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListxin = newfileList;
    },
    handleRemoveshou(file, fileList) {
      console.log('555');
      console.log(file, fileList);
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 3),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 3) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListshou = newfileList;
    },
    handleRemovefei(file, fileList) {
      console.log('555');
      console.log(file, fileList);
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 4),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 4) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListfei = newfileList;
    },
    handleRemovedui(file, fileList) {
      console.log('555');
      console.log(file, fileList);
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 5),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 5) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListdui = newfileList;
    },

    handleRemovefeizi(file, fileList) {
      console.log('555');
      console.log(file, fileList);
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 6),
        1
      );
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 6),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 6) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListfeizi = newfileList;
    },
    handleRemovedan(file, fileList) {
      console.log(this.userIcbcFilingDTOList, '5559');
      console.log(file, fileList);
      this.fileTypearr.splice(
        this.fileTypearr.findIndex((item) => item === 7),
        1
      );
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 7) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.fileListdan = newfileList;
    },
    handleRemoveshenfan(file, fileList) {
      console.log(file, fileList);
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 11) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgListshenfan = newfileList;
    },
    handleRemoveshenzheng(file, fileList) {
      console.log(file, fileList);
      this.userIcbcFilingDTOList.forEach((item, i) => {
        if (item.fileType == 10) {
          this.userIcbcFilingDTOList.splice(i, 1); //在数组的some方法中，如果return true，就会立即终止这个数组的后续循环
          return true;
        }
      });
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgListshenzheng = newfileList;
    },
    handleRemovetwo(file, fileList) {
      this.formShopShow.storeOwnerPic = '';
      console.log(file, fileList);
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgListtwo = newfileList;
    },
    handleRemovethree(file, fileList) {
      this.formShopShow.storeManagerPic = '';
      console.log(file, fileList);
      let newfileList = [];
      fileList.forEach((item, i) => {
        let data = {
          name: item.name,
          url: item.url,
        };
        newfileList.push(data);
      });
      this.imgListthree = newfileList;
    },
    beforeAvatarUpload(file) {
      //   const isSize = imgSize(file); // 这里使用,传入file值
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!isLt2M) {
        this.$message.error('上传图片大小不得超过30MB!');
      }
      //   if (!isSize) {
      //     this.$message.error("上传的图片建议比例750:400");
      //   }
      //  校验不通过则不上传文件
      return isLt2M && isLt2M;
    },
    beforeAvatarUploadone(file) {
      //   const isSize = imgSize(file); // 这里使用,传入file值
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!isLt2M) {
        this.$message.error('上传图片大小不得超过30MB!');
      }
      //   if (!isSize) {
      //     this.$message.error("上传的图片建议比例750:400");
      //   }
      //  校验不通过则不上传文件
      return isLt2M && isLt2M;
    },
    beforeAvatarUploadjie(file) {
      //   const isSize = imgSize(file); // 这里使用,传入file值
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!isLt2M) {
        this.$message.error('上传图片大小不得超过30MB!');
      }
      //   if (!isSize) {
      //     this.$message.error("上传的图片建议比例750:400");
      //   }
      //  校验不通过则不上传文件
      return isLt2M && isLt2M;
    },
    beforeAvatarUploadshenfan(file) {
      //   const isSize = imgSize(file); // 这里使用,传入file值
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!isLt2M) {
        this.$message.error('上传图片大小不得超过30MB!');
      }
      //   if (!isSize) {
      //     this.$message.error("上传的图片建议比例750:400");
      //   }
      //  校验不通过则不上传文件
      return isLt2M && isLt2M;
    },
    beforeAvatarUploadshenzheng(file) {
      //   const isSize = imgSize(file); // 这里使用,传入file值
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!isLt2M) {
        this.$message.error('上传图片大小不得超过30MB!');
      }
      //   if (!isSize) {
      //     this.$message.error("上传的图片建议比例750:400");
      //   }
      //  校验不通过则不上传文件
      return isLt2M && isLt2M;
    },
    beforeAvatarUploadtwo(file) {
      //   const isSize = imgSize(file); // 这里使用,传入file值
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!isLt2M) {
        this.$message.error('上传图片大小不得超过30MB!');
      }
      //   if (!isSize) {
      //     this.$message.error("上传的图片建议比例750:400");
      //   }
      //  校验不通过则不上传文件
      return isLt2M && isLt2M;
    },
    beforeAvatarUploadthree(file) {
      //   const isSize = imgSize(file); // 这里使用,传入file值
      const isLt2M = file.size / 1024 / 1024 < 30;
      if (!isLt2M) {
        this.$message.error('上传图片大小不得超过30MB!');
      }
      //   if (!isSize) {
      //     this.$message.error("上传的图片建议比例750:400");
      //   }
      //  校验不通过则不上传文件
      return isLt2M && isLt2M;
    },

    getMsgFormSon(data) {
      console.log(data, '666');
    },

    getlocation() {
      this.showMapComponent = true;
      this.init();
    },
    _getAllZone() {
      let data = {};

      //  };
      getAllZone(data).then((res) => {
        this.corpList = res.result;

        // this.selCore(this.formCorp.upOrgSeq)
      });
    },

    selCore(value) {
      console.log(value, 'kk55');
      let data = {
        code: value,
      };
      getAllBase(data).then((res) => {
        this.RentalPayWay = res.result;
        console.log(this.RentalPayWay, 'kkrr');
      });
    },
    // parentFn(childData) {
    //   this.message = childData;
    //   console.log("kjk");
    // },
    selbase(value) {
      console.log(value, 'kkuu');
      this.formCorp.baseCode = value;
      let data = {
        orgSeq: value,
      };
      getBaseUserInfo(data).then((res) => {
        this.Renarr = res.result;
        console.log(this.Renarr, 'kkuuvv');
      });
    },
    selbasePerson(value) {
      console.log(value, 'kkuuw');
      //   this.formCorp.basePersonCode = value;
    },
    handleImgChange(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgList.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgList, 'llloo');
      }
    },
    handleImgChangeone(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgListone.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListone, 'llloo');
      }
    },
    handleImgChangejie(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgListjie.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListjie, 'llloo');
      }
    },
    handleImgChangeshenfan(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgListshenfan.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListshenfan, 'llloo');
      }
    },
    handleImgChangeshenzheng(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgListshenzheng.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListshenzheng, 'llloo');
      }
    },
    handleImgChangetwo(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgListtwo.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListtwo, 'llloo');
      }
    },
    handleImgChangethree(file, fileList) {
      console.log(file, 'lllttt');
      // 这里可以打印file查看数据结构
      if (file.response) {
        // 判断是否上传成功;
        this.imgListthree.push({
          url: file.response.result,
          status: 'finished',
        }); //上传成功之后把值添加到imglist中
        console.log(this.imgListthree, 'llloo');
      }
    },
    handleCheckAllWeekChange(val) {
      var week = [1, 2, 3, 4, 5, 6, 0];
      this.formShop.shopHours = val ? week : [];
      this.isIndeterminate = false;
    },
    // 单选
    handleCheckedWeekChange(value) {
      var checkedCount = value.length;
      this.checkAllWeek = checkedCount === this.week.length;
      this.isIndeterminate =
        checkedCount > 0 && checkedCount < this.week.length;
    },
    // 店铺信息 end
    // 展示信息
    addType() {
      this.formShopShow.shopPhotos.push({
        id: '',
        fileType: '',
        label: '',
        labelOrdinal: '',
        ordinal: '',
        url: '',
      });
    },
    delType(index) {
      if (this.formShopShow.shopPhotos.length > 1) {
        this.formShopShow.shopPhotos.splice(index, 1);
      }
    },

    addRecmdProducts() {
      var index = 1;
      this.dialogRecmdProducts = false;
      this.formShopShow.recmdProducts.push({
        id: ++index,
        productId: '',
        productName: this.formShopShow.productName,
        introduction: this.formShopShow.introduction,
        ordinal: '',
        url: '',
      });
    },

    addProduct() {
      this.dialogRecmdProducts = true;
      this.formShopShow.productName = '';
      this.formShopShow.introduction = '';
    },
    handleClose() {
      this.dialogRecmdProducts = false;
    },
    edit(item) {
      this.dialogRecmdProducts = true;
    },
    deleteX(item) {
      this.$confirm('是否删除').then(() => {});
    },

    handlePictureCardPreview(file) {
      console.log(file, 'ooo');
      this.dialogImageUrl = file.url;
      this.dialogVisible1 = true;
    },
    handlePictureCardPreview1(file) {
      console.log(file, 'ooo');
      this.dialogImageUrl1 = file.url;
      this.dialogVisible2 = true;
    },
    handlePictureCardPreviewjie(file) {
      console.log(file, 'ooo');
      this.dialogImageUrljie = file.url;
      this.dialogVisiblejie = true;
    },
    handlePictureCardPreviewshenfan(file) {
      console.log(file, 'ooo');
      this.dialogImageUrlshenfan = file.url;
      this.dialogVisibleshenfan = true;
    },
    handlePictureCardPreviewshenzheng(file) {
      console.log(file, 'ooo');
      this.dialogImageUrlshenzheng = file.url;
      this.dialogVisibleshenzheng = true;
    },
    handlePictureCardPreview2(file) {
      console.log(file, 'ooo');
      this.dialogImageUrl2 = file.url;
      this.dialogVisible3 = true;
    },
    handlePictureCardPreview3(file) {
      console.log(file, 'ooo');
      this.dialogImageUrl3 = file.url;
      this.dialogVisible4 = true;
    },
    upLoadPic(file, fileList) {
      console.log(file, 'popo');
      this.dialogImageUrl = file.result;
      this.formRental.businessLicense = file.result;
      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);

      uploadFile(formData).then((res) => {
        console.log(res);

        this.userIcbcFilingDTOList.push({
          fileType: 8,
          fileScanningCopy: file.result,
          icbckey: res.result,
          status: 1,
        });
      });
      console.log(this.userIcbcFilingDTOList, '7878787');
      //   this.submitForm("formCorp");
    },
    upLoadPicone(file, fileList) {
      console.log(file, 'popo');
      this.dialogImageUrl1 = file.result;
      this.formRental.doorwayPic = file.result;
      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);

      uploadFile(formData).then((res) => {
        console.log(res);

        this.userIcbcFilingDTOList.push({
          fileType: 9,
          fileScanningCopy: file.result,
          icbckey: res.result,
          status: 1,
        });
      });
    },
    upLoadPicjie(file, fileList) {
      console.log(this.userIcbcFilingDTOList, 'o88');
      this.dialogImageUrljie = file.result;
      this.formRental.settlementPic = file.result;
      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);

      uploadFile(formData).then((res) => {
        this.userIcbcFilingDTOList.push({
          fileType: 12,
          fileScanningCopy: file.result,
          icbckey: res.result,
          status: 1,
        });
      });
    },
    upLoadPicfa(file, fileList) {
      console.log(file, fileList, 'popo88');

      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(1);
      uploadFile(formData).then((res) => {
        console.log(res);

        this.userIcbcFilingDTOList.push({
          fileTempId: this.fileTempId,
          fileType: 1,
          fileScanningCopy: file.result,
          icbckey: res.result,
          status: 1,
        });
      });
    },
    upLoadPicxin(file, fileList) {
      console.log(file, fileList, 'popo88');

      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(2);
      uploadFile(formData).then((res) => {
        console.log(res);

        this.userIcbcFilingDTOList.push({
          fileTempId: this.fileTempId,
          fileType: 2,
          fileScanningCopy: file.result,
          icbckey: res.result,
          status: 1,
        });
      });
    },
    upLoadPicshou(file, fileList) {
      console.log(file, fileList, 'popo88');

      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(3);
      uploadFile(formData).then((res) => {
        console.log(res);

        this.userIcbcFilingDTOList.push({
          fileTempId: this.fileTempId,
          fileType: 3,
          fileScanningCopy: file.result,
          icbckey: res.result,
          status: 1,
        });
      });
    },
    upLoadPicfei(file, fileList) {
      console.log(file, fileList, 'popo88');

      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(4);
      uploadFile(formData).then((res) => {
        console.log(res);

        this.userIcbcFilingDTOList.push({
          fileTempId: this.fileTempId,
          fileType: 4,
          fileScanningCopy: file.result,
          icbckey: res.result,
          status: 1,
        });
      });
    },
    upLoadPicdui(file, fileList) {
      console.log(file, fileList, 'popo88');

      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(5);
      uploadFile(formData).then((res) => {
        console.log(res);

        this.userIcbcFilingDTOList.push({
          fileTempId: this.fileTempId,
          fileType: 5,
          fileScanningCopy: file.result,
          icbckey: res.result,
          status: 1,
        });
      });
    },
    upLoadPicfeizi(file, fileList) {
      console.log(file, fileList, 'popo88');

      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(6);
      uploadFile(formData).then((res) => {
        console.log(res);

        this.userIcbcFilingDTOList.push({
          fileTempId: this.fileTempId,
          fileType: 6,
          fileScanningCopy: file.result,
          icbckey: res.result,
          status: 1,
        });
      });
    },
    upLoadPicdan(file, fileList) {
      console.log(file, fileList, 'popo88');
      console.log(this.userIcbcFilingDTOList, '5533');
      //   this.formRental.settlementPic = file.result;
      this.fileScanningCopy = file.result;

      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);
      this.fileTypearr.push(7);
      uploadFile(formData).then((res) => {
        console.log(res);

        this.userIcbcFilingDTOList.push({
          fileTempId: this.fileTempId,
          fileType: 7,
          fileScanningCopy: file.result,
          icbckey: res.result,
          status: 1,
        });
      });
    },
    upLoadPicshenfan(file, fileList) {
      console.log(file, 'popo');
      this.dialogImageUrlshenfan = file.result;
      this.formRental.backCard = file.result;
      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);

      uploadFile(formData).then((res) => {
        console.log(res);

        this.userIcbcFilingDTOList.push({
          fileType: 11,
          fileScanningCopy: file.result,
          icbckey: res.result,
          status: 1,
        });
      });
    },
    upLoadPicshenzheng(file, fileList) {
      console.log(file, 'popo');
      this.dialogImageUrlshenzheng = file.result;
      this.formRental.frontCard = file.result;
      let formData = new FormData();
      //   formData.append("category", "settingPic");
      formData.append('file', fileList.raw);
      console.log(formData);

      uploadFile(formData).then((res) => {
        console.log(res);

        this.userIcbcFilingDTOList.push({
          fileType: 10,
          fileScanningCopy: file.result,
          icbckey: res.result,
          status: 1,
        });
      });
    },
    upLoadPictwo(file, fileList) {
      console.log(file, 'popo');
      this.dialogImageUrl2 = file.result;
      this.formShopShow.storeOwnerPic = file.result;
    },
    upLoadPicthree(file, fileList) {
      console.log(file, 'popo');
      this.dialogImageUrl3 = file.result;
      this.formShopShow.storeManagerPic = file.result;
    },
    //验证表单信息
    submitForm(formName, success) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          //通过进入下一步
          this.active += 1;
          success && success();
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    prev() {
      if (this.active-- === 0) this.active = 0;
    },
    next() {
      //每一步都要验证表单

      if (this.active === 0) {
        //验证商家信息
        this.submitForm('formCorp');
      } else if (this.active === 1) {
        //验证店铺信息
        this.submitForm('formShop');
      } else if (this.active === 2) {
        //验证展示信息
        this.submitForm('formShopShow');
      } else if (this.active === 3) {
        //验证租金收银信息
        this.submitForm('formRental', () => {
          //全部通过 提交ajax
          console.log('oopop');
          this.postFormAjax();
        });
      }
    },
    postFormAjax() {
      //   this.authCode = localStorage.getItem("authCode");
      if (this.formCorp.storeName == '' || this.formCorp.storeName == null) {
        this.$message.error('请输入店铺名称');
        return;
      }

      if (this.formCorp.storeType == '' || this.formCorp.storeType == null) {
        this.$message.error('请选择店铺类型');
        return;
      }
      if (this.formCorp.upOrgSeq == '' || this.formCorp.upOrgSeq == null) {
        this.$message.error('请选择所属大区');
        return;
      }
      if (this.formCorp.baseCode == '' || this.formCorp.baseCode == null) {
        this.$message.error('请选择所属营销区域');
        return;
      }
      if (
        this.formCorp.managerArea == '' ||
        this.formCorp.managerArea == null
      ) {
        this.$message.error('请输入经营面积');
        return;
      }
      if (
        this.formCorp.orderCustomerCode == '' ||
        this.formCorp.orderCustomerCode == null
      ) {
        this.$message.error('请输入订单客户编号');
        return;
      }
      if (this.formShop.openDate == '' || this.formShop.openDate == null) {
        this.$message.error('请填写开业日期');
        return;
      }
      if (this.formShop.province == '' || this.formShop.province == null) {
        this.$message.error('请选择所属省市');
        return;
      }
      if (this.formShop.city == '' || this.formShop.city == null) {
        this.$message.error('请选择所属省市');
        return;
      }
      if (this.formShop.area == '' || this.formShop.area == null) {
        this.$message.error('请选择所属省市');
        return;
      }
      if (
        this.formShop.storeAddressDetail == '' ||
        this.formShop.storeAddressDetail == null
      ) {
        this.$message.error('请输入店铺详细地址');
        return;
      }
      if (this.formShop.storeLng == '' || this.formShop.storeLng == null) {
        this.$message.error('请输入经度');
        return;
      }
      if (this.formShop.storeLat == '' || this.formShop.storeLat == null) {
        this.$message.error('请输入纬度');
        return;
      }
      if (
        this.formShop.companyName == '' ||
        this.formShop.companyName == null
      ) {
        this.$message.error('请输入经销商名');
        return;
      }
      if (this.formShop.value1 == '' || this.formShop.value1 == null) {
        this.$message.error('请输入营业时间');
        return;
      }
      if (this.formShop.value2 == '' || this.formShop.value2 == null) {
        this.$message.error('请输入营业时间');
        return;
      }
      if (
        this.formShopShow.legalPerson == '' ||
        this.formShopShow.legalPerson == null
      ) {
        this.$message.error('请输入法人');
        return;
      }
      if (
        this.formShopShow.legalPersonPhone == '' ||
        this.formShopShow.legalPersonPhone == null
      ) {
        this.$message.error('请输入法人手机号');
        return;
      }

      if (
        this.formShopShow.storeOwnerName == '' ||
        this.formShopShow.storeOwnerName == null
      ) {
        this.$message.error('请输入店主姓名');
        return;
      }
      if (
        this.formShopShow.storeOwnerPhone == '' ||
        this.formShopShow.storeOwnerPhone == null
      ) {
        this.$message.error('请输入店主手机号');
        return;
      }
      if (
        this.formShopShow.storePhone == '' ||
        this.formShopShow.storePhone == null
      ) {
        this.$message.error('请输入店铺电话');
        return;
      }
      //          if (this.formShopShow.storeManagerName== "" || this.formShopShow.storeManagerName== null) {
      //   this.$message.error("请输入店长姓名");
      //   return;
      // }
      //          if (this.formShopShow.storeManagerPhone== "" || this.formShopShow.storeManagerPhone== null) {
      //   this.$message.error("请输入店长电话");
      //   return;
      // }

      if (
        this.formShopShow.storeOwnerPic == '' ||
        this.formShopShow.storeOwnerPic == null
      ) {
        this.$message.error('请输入店主照片');
        return;
      }

      //          if (this.formShopShow.storeManagerPic=="" || this.formShopShow.storeManagerPic==null) {
      //   this.$message.error("请输入店长照片");
      //   return;
      // }

      //                if (this.formRental.isIcbc== "" || this.formRental.isIcbc== null) {
      //         this.$message.error("是否有工行对公账户");
      //         return;
      //       }
      //                if (this.formRental.businessLicense== "" || this.formRental.businessLicense== null) {
      //         this.$message.error("请输入营业执照");
      //         return;
      //       }
      //                 if (this.formRental.doorwayPic== "" || this.formRental.doorwayPic== null) {
      //         this.$message.error("请输入专卖店门头图片");
      //         return;
      //       }
      //               if (this.formRental.frontCard== "" || this.formRental.frontCard== null) {
      //         this.$message.error("请输入法人身份证正面照片");
      //         return;
      //       }
      //           if (this.formRental.backCard== "" || this.formRental.backCard== null) {
      //         this.$message.error("请输入法人身份证背面照片");
      //         return;
      //       }
      //             if (this.formRental.settlementPic== "" || this.formRental.settlementPic== null) {
      //         this.$message.error("请输入结算账号照片");
      //         return;
      //       }
      //     if (this.icbcstatus == 0) {
      //     //   this.userIcbcFilingDTOList.forEach((item,i)=>{
      //     //      this.fileTypearr.push(this.userIcbcFilingDTOList[i].fileType);
      //     //      console.log( this.fileTypearr,"oioi")

      //     //   })
      //         console.log( this.fileTypearr,"oioirr")
      //             if(this.fileTypearr.indexOf(1)==-1){
      //           this.$message.error("请上传法定代表人授权书");
      //         return;
      //       }
      //              if(this.fileTypearr.indexOf(2)==-1){
      //           this.$message.error("请上传信息查询使用授权书");
      //         return;
      //       }
      //               if(this.fileTypearr.indexOf(3)==-1){
      //           this.$message.error("请上传收单业务书");
      //         return;
      //       }
      //                if(this.fileTypearr.indexOf(4)==-1){
      //           this.$message.error("请上传非金融企业划型信息采集表");
      //         return;
      //       }
      //                  if(this.fileTypearr.indexOf(5)==-1){
      //           this.$message.error("请上传对公客户信息采集表");
      //         return;
      //       }
      //                  if(this.fileTypearr.indexOf(6)==-1){
      //           this.$message.error("请上传非自然人客户受益所有人采集表");
      //         return;
      //       }
      //                  if(this.fileTypearr.indexOf(7)==-1){
      //           this.$message.error("请上传单位税收居民声明文件");
      //         return;
      //       }
      //     }else if(this.icbcstatus == 1){
      // //  this.userIcbcFilingDTOList.forEach((item,i)=>{
      // //          this.fileTypearr.push(this.userIcbcFilingDTOList[i].fileType);
      // //          console.log( this.fileTypearr,"oioi")

      // //       })
      //         console.log( this.fileTypearr,"oioirr")
      //             if(this.fileTypearr.indexOf(1)==-1){
      //           this.$message.error("请上传法定代表人授权书");
      //         return;
      //       }
      //              if(this.fileTypearr.indexOf(2)==-1){
      //           this.$message.error("请上传信息查询使用授权书");
      //         return;
      //       }
      //               if(this.fileTypearr.indexOf(3)==-1){
      //           this.$message.error("请上传收单业务书");
      //         return;
      //       }

      //     }
      let data = {
        // 选择商户参数
        // uuid: this.mainuuid,
        authCode: this.authCode,
        storeName: this.formCorp.storeName,
        storeType: this.formCorp.storeType,

        buildingArea: this.formCorp.buildingArea,
        practicalArea: this.formCorp.practicalArea,
        leaseholdArea: this.formCorp.leaseholdArea,
        warehouseArea: this.formCorp.warehouseArea,
        leaseholdArea: this.formCorp.leaseholdArea,
        managerArea: this.formCorp.managerArea,
        orderCustomerCode: this.formCorp.orderCustomerCode,
        upOrgSeq: this.formCorp.upOrgSeq,
        baseCode: this.formCorp.baseCode,
        // basePersonCode: this.formCorp.basePersonCode,
        openDate: this.formShop.openDate,
        province: this.formShop.province,
        county: this.formShop.area,
        city: this.formShop.city,
        storeAddressDetail: this.formShop.storeAddressDetail,

        storeLng: this.formShop.storeLng,
        storeLat: this.formShop.storeLat,
        companyName: this.formShop.companyName,
        openBeginTime: this.formShop.value1,
        openEndTime: this.formShop.value2,

        legalPerson: this.formShopShow.legalPerson,
        legalPersonPhone: this.formShopShow.legalPersonPhone,
        storeOwnerName: this.formShopShow.storeOwnerName,
        storeOwnerPhone: this.formShopShow.storeOwnerPhone,
        storePhone: this.formShopShow.storePhone,
        storeOwnerGrade: this.formShopShow.storeOwnerGrade,
        storeManagerPhone: this.formShopShow.storeManagerPhone,
        storeManagerName: this.formShopShow.storeManagerName,

        storeOwnerPic: this.formShopShow.storeOwnerPic,
        storeManagerPic: this.formShopShow.storeManagerPic,

        // isIcbc: this.formRental.isIcbc,
        // businessLicense: this.formRental.businessLicense,
        // doorwayPic: this.formRental.doorwayPic,
        // frontCard: this.formRental.frontCard,
        // backCard: this.formRental.backCard,
        // settlementPic: this.formRental.settlementPic,
        merid: this.formRental.merid,
        agreement: this.formRental.agreement,
        wechatId: this.formRental.wechatId,
        // userIcbcFilingDTOList: this.userIcbcFilingDTOList
      };
      console.log(data);
      this.$confirm('确认提交审核吗？').then(() => {
        editStore(data).then((res) => {
          console.log(res);
          if (res.code == 1) {
            this.$message({
              message: '提交成功',
              type: 'success',
              center: true,
            });
            this.$router.push('/shopArchives');
          } else {
            this.$message({
              message: res.message,
              type: 'error',
              center: true,
            });
          }
        });
      });
    },
    postFormAjaxone() {
      //   this.authCode = localStorage.getItem("authCode");
      if (this.formCorp.storeName == '' || this.formCorp.storeName == null) {
        this.$message.error('请输入店铺名称');
        return;
      }

      if (this.formCorp.storeType == '' || this.formCorp.storeType == null) {
        this.$message.error('请选择店铺类型');
        return;
      }
      if (this.formCorp.upOrgSeq == '' || this.formCorp.upOrgSeq == null) {
        this.$message.error('请选择所属大区');
        return;
      }
      if (this.formCorp.baseCode == '' || this.formCorp.baseCode == null) {
        this.$message.error('请选择所属营销区域');
        return;
      }
      if (
        this.formCorp.managerArea == '' ||
        this.formCorp.managerArea == null
      ) {
        this.$message.error('请输入经营面积');
        return;
      }
      if (
        this.formCorp.orderCustomerCode == '' ||
        this.formCorp.orderCustomerCode == null
      ) {
        this.$message.error('请输入订单客户编号');
        return;
      }
      if (this.formShop.openDate == '' || this.formShop.openDate == null) {
        this.$message.error('请填写开业日期');
        return;
      }
      if (this.formShop.province == '' || this.formShop.province == null) {
        this.$message.error('请选择所属省市');
        return;
      }
      if (this.formShop.city == '' || this.formShop.city == null) {
        this.$message.error('请选择所属省市');
        return;
      }
      if (this.formShop.area == '' || this.formShop.area == null) {
        this.$message.error('请选择所属省市');
        return;
      }
      if (
        this.formShop.storeAddressDetail == '' ||
        this.formShop.storeAddressDetail == null
      ) {
        this.$message.error('请输入店铺详细地址');
        return;
      }
      if (this.formShop.storeLng == '' || this.formShop.storeLng == null) {
        this.$message.error('请输入经度');
        return;
      }
      if (this.formShop.storeLat == '' || this.formShop.storeLat == null) {
        this.$message.error('请输入纬度');
        return;
      }
      if (
        this.formShop.companyName == '' ||
        this.formShop.companyName == null
      ) {
        this.$message.error('请输入经销商名');
        return;
      }
      if (this.formShop.value1 == '' || this.formShop.value1 == null) {
        this.$message.error('请输入营业时间');
        return;
      }
      if (this.formShop.value2 == '' || this.formShop.value2 == null) {
        this.$message.error('请输入营业时间');
        return;
      }
      if (
        this.formShopShow.legalPerson == '' ||
        this.formShopShow.legalPerson == null
      ) {
        this.$message.error('请输入法人');
        return;
      }
      if (
        this.formShopShow.legalPersonPhone == '' ||
        this.formShopShow.legalPersonPhone == null
      ) {
        this.$message.error('请输入法人手机号');
        return;
      }

      if (
        this.formShopShow.storeOwnerName == '' ||
        this.formShopShow.storeOwnerName == null
      ) {
        this.$message.error('请输入店主姓名');
        return;
      }
      if (
        this.formShopShow.storeOwnerPhone == '' ||
        this.formShopShow.storeOwnerPhone == null
      ) {
        this.$message.error('请输入店主手机号');
        return;
      }
      if (
        this.formShopShow.storePhone == '' ||
        this.formShopShow.storePhone == null
      ) {
        this.$message.error('请输入店铺电话');
        return;
      }
      //          if (this.formShopShow.storeManagerName== "" || this.formShopShow.storeManagerName== null) {
      //   this.$message.error("请输入店长姓名");
      //   return;
      // }
      //          if (this.formShopShow.storeManagerPhone== "" || this.formShopShow.storeManagerPhone== null) {
      //   this.$message.error("请输入店长电话");
      //   return;
      // }

      if (
        this.formShopShow.storeOwnerPic == '' ||
        this.formShopShow.storeOwnerPic == null
      ) {
        this.$message.error('请输入店主照片');
        return;
      }

      //          if (this.formShopShow.storeManagerPic=="" || this.formShopShow.storeManagerPic==null) {
      //   this.$message.error("请输入店长照片");
      //   return;
      // }

      //                if (this.formRental.isIcbc== "" || this.formRental.isIcbc== null) {
      //         this.$message.error("是否有工行对公账户");
      //         return;
      //       }
      //                if (this.formRental.businessLicense== "" || this.formRental.businessLicense== null) {
      //         this.$message.error("请输入营业执照");
      //         return;
      //       }
      //                 if (this.formRental.doorwayPic== "" || this.formRental.doorwayPic== null) {
      //         this.$message.error("请输入专卖店门头图片");
      //         return;
      //       }
      //               if (this.formRental.frontCard== "" || this.formRental.frontCard== null) {
      //         this.$message.error("请输入法人身份证正面照片");
      //         return;
      //       }
      //           if (this.formRental.backCard== "" || this.formRental.backCard== null) {
      //         this.$message.error("请输入法人身份证背面照片");
      //         return;
      //       }
      //             if (this.formRental.settlementPic== "" || this.formRental.settlementPic== null) {
      //         this.$message.error("请输入结算账号照片");
      //         return;
      //       }
      //     if (this.icbcstatus == 0) {
      //     //   this.userIcbcFilingDTOList.forEach((item,i)=>{
      //     //      this.fileTypearr.push(this.userIcbcFilingDTOList[i].fileType);
      //     //      console.log( this.fileTypearr,"oioi")

      //     //   })
      //         console.log( this.fileTypearr,"oioirr")
      //             if(this.fileTypearr.indexOf(1)==-1){
      //           this.$message.error("请上传法定代表人授权书");
      //         return;
      //       }
      //              if(this.fileTypearr.indexOf(2)==-1){
      //           this.$message.error("请上传信息查询使用授权书");
      //         return;
      //       }
      //               if(this.fileTypearr.indexOf(3)==-1){
      //           this.$message.error("请上传收单业务书");
      //         return;
      //       }
      //                if(this.fileTypearr.indexOf(4)==-1){
      //           this.$message.error("请上传非金融企业划型信息采集表");
      //         return;
      //       }
      //                  if(this.fileTypearr.indexOf(5)==-1){
      //           this.$message.error("请上传对公客户信息采集表");
      //         return;
      //       }
      //                  if(this.fileTypearr.indexOf(6)==-1){
      //           this.$message.error("请上传非自然人客户受益所有人采集表");
      //         return;
      //       }
      //                  if(this.fileTypearr.indexOf(7)==-1){
      //           this.$message.error("请上传单位税收居民声明文件");
      //         return;
      //       }
      //     }else if(this.icbcstatus == 1){
      // //  this.userIcbcFilingDTOList.forEach((item,i)=>{
      // //          this.fileTypearr.push(this.userIcbcFilingDTOList[i].fileType);
      // //          console.log( this.fileTypearr,"oioi")

      // //       })
      //         console.log( this.fileTypearr,"oioirr")
      //             if(this.fileTypearr.indexOf(1)==-1){
      //           this.$message.error("请上传法定代表人授权书");
      //         return;
      //       }
      //              if(this.fileTypearr.indexOf(2)==-1){
      //           this.$message.error("请上传信息查询使用授权书");
      //         return;
      //       }
      //               if(this.fileTypearr.indexOf(3)==-1){
      //           this.$message.error("请上传收单业务书");
      //         return;
      //       }

      //     }
      let data = {
        // 选择商户参数
        // uuid: this.mainuuid,
        authCode: this.authCode,
        storeName: this.formCorp.storeName,
        storeType: this.formCorp.storeType,

        buildingArea: this.formCorp.buildingArea,
        practicalArea: this.formCorp.practicalArea,
        leaseholdArea: this.formCorp.leaseholdArea,
        warehouseArea: this.formCorp.warehouseArea,
        leaseholdArea: this.formCorp.leaseholdArea,
        managerArea: this.formCorp.managerArea,
        orderCustomerCode: this.formCorp.orderCustomerCode,
        upOrgSeq: this.formCorp.upOrgSeq,
        baseCode: this.formCorp.baseCode,
        // basePersonCode: this.formCorp.basePersonCode,
        openDate: this.formShop.openDate,
        province: this.formShop.province,
        county: this.formShop.area,
        city: this.formShop.city,
        storeAddressDetail: this.formShop.storeAddressDetail,

        storeLng: this.formShop.storeLng,
        storeLat: this.formShop.storeLat,
        companyName: this.formShop.companyName,
        openBeginTime: this.formShop.value1,
        openEndTime: this.formShop.value2,

        legalPerson: this.formShopShow.legalPerson,
        legalPersonPhone: this.formShopShow.legalPersonPhone,
        storeOwnerName: this.formShopShow.storeOwnerName,
        storeOwnerPhone: this.formShopShow.storeOwnerPhone,
        storePhone: this.formShopShow.storePhone,
        storeOwnerGrade: this.formShopShow.storeOwnerGrade,
        storeManagerPhone: this.formShopShow.storeManagerPhone,
        storeManagerName: this.formShopShow.storeManagerName,

        storeOwnerPic: this.formShopShow.storeOwnerPic,
        storeManagerPic: this.formShopShow.storeManagerPic,

        // isIcbc: this.formRental.isIcbc,
        // businessLicense: this.formRental.businessLicense,
        // doorwayPic: this.formRental.doorwayPic,
        // frontCard: this.formRental.frontCard,
        // backCard: this.formRental.backCard,
        // settlementPic: this.formRental.settlementPic,
        merid: this.formRental.merid,
        agreement: this.formRental.agreement,
        wechatId: this.formRental.wechatId,
        // userIcbcFilingDTOList: this.userIcbcFilingDTOList
      };
      console.log(data);
      // this.$confirm("确认提交审核吗？").then(() => {
      editStore(data).then((res) => {
        console.log(res);
        if (res.code == 1) {
          this.$message({
            message: '提交成功',
            type: 'success',
            center: true,
          });
          this.$router.push('/shopArchives');
        } else {
          this.$message({
            message: res.message,
            type: 'error',
            center: true,
          });
        }
      });
      // });
    },
    postFormAjaxquxiao() {
      let data = {
        authCode: this.authCode,
      };
      returnBack(data).then((res) => {
        console.log(res);
        if (res.code == 1) {
          // this.$message({
          //   message: "提交成功",
          //   type: "success",
          //   center: true
          // });
          this.$router.push('/shopArchives');
        } else {
          //   this.$message({
          //   message: res.message,
          //   type: "error",
          //   center: true
          // });
        }
      });
      // });
    },
    postFormAjaxquxiaoone() {
      let data = {
        authCode: this.authCode,
      };
      returnBack(data).then((res) => {
        console.log(res);
        if (res.code == 1) {
          // this.$message({
          //   message: "提交成功",
          //   type: "success",
          //   center: true
          // });
          // this.$router.push("/shopArchives");
          // window.history.go(1)
          // next()
        } else {
          //   this.$message({
          //   message: res.message,
          //   type: "error",
          //   center: true
          // });
        }
      });
      // });
    },
    changeisIcbc(v) {
      console.log(v, 'ii9');
      this.icbcstatus = v;
      if (v == 0) {
        this.RentalRules.fading[0].required = true;
        this.RentalRules.xinxi[0].required = true;
        this.RentalRules.shoudan[0].required = true;
        this.RentalRules.feijin[0].required = true;
        this.RentalRules.duigong[0].required = true;
        this.RentalRules.feizi[0].required = true;
        this.RentalRules.danwei[0].required = true;
      } else if (v == 1) {
        this.RentalRules.fading[0].required = true;
        this.RentalRules.xinxi[0].required = true;
        this.RentalRules.shoudan[0].required = true;
        this.RentalRules.feijin[0].required = false;
        this.RentalRules.duigong[0].required = false;
        this.RentalRules.feizi[0].required = false;
        this.RentalRules.danwei[0].required = false;
      }
    },
    //      goback(){
    //     this.$router.push("/loign")
    // },
    kong() {
      this.formInline.realName = '';
      this.formInline.tel = '';
    },
    creatoneOrg() {
      this.salesclerkFlag = false;
      this.flagdianone = false;
      this.dialogVisibleorg = !this.dialogVisibleorg;
      this.shopname = '店员照片';
      this.ruleForm.realName = '';
      this.ruleForm.onboardDate = '';
      this.ruleForm.workYear = '';
      this.ruleForm.academic = '';
      this.ruleForm.tel = '';
      this.ruleForm.status = '';
      this.ruleForm.isFullTime = '';
      this.ruleForm.headPicUrl = '';
      this.ruleForm.idCard = '';
      this.ruleForm.sex = '';
      this.flagorg = true;
      this.imgListone = [];
      this.imgListoneyuan = [];
      console.log(this.flagorg, 'lo');
    },
    changeorg(v) {
      this.ruleForm.isFullTime = v.isFullTime.toString();

      this.salesclerkFlag = false;
      if (v.userType === '6') {
        this.salesclerkFlag = true;
      }
      if (v.userType == 5) {
        this.flagdianone = true;
        this.shopname = '店长照片';
      } else {
        this.flagdianone = false;
        this.shopname = '店员照片';
      }
      (this.userType = v.userType),
        (this.ruleForm.realName = v.realName),
        (this.ruleForm.onboardDate = v.onboardDate),
        (this.ruleForm.workYear = String(v.workYear)),
        (this.ruleForm.academic = String(v.academic)),
        (this.ruleForm.tel = v.tel),
        (this.ruleForm.idCard = v.idCard),
        (this.ruleForm.sex = String(v.sex)),
        (this.ruleForm.status = String(v.status)),
        (this.ruleForm.headPicUrl = v.headPicUrl);
      this.userId = v.userId;
      this.uuidyuan = v.uuid;
      this.dialogVisibleorg = !this.dialogVisibleorg;
      this.flagorg = false;
      var headPicUrl = v.headPicUrl;

      this.imgListoneyuan = [];
      if (v.headPicUrl != '' && v.headPicUrl != null) {
        let data = {
          name: '',
          url: v.headPicUrl,
        };
        this.imgListoneyuan.push(data);
      }
      if (this.ruleForm.sex == 'null') {
        this.ruleForm.sex = '';
      }
      if (this.ruleForm.academic == 'null') {
        this.ruleForm.academic = '';
      }
    },
    confirmEditone() {
      if (this.ruleForm.realName == '' || this.ruleForm.realName == null) {
        this.$message.error('请输入店员姓名');
        return;
      }
      if (
        this.ruleForm.onboardDate == '' ||
        this.ruleForm.onboardDate == null
      ) {
        this.$message.error('请输入上岗日期');
        return;
      }

      if (this.ruleForm.sex == '' || this.ruleForm.sex == null) {
        this.$message.error('请选择性别');
        return;
      }
      if (this.ruleForm.academic == '' || this.ruleForm.academic == null) {
        this.$message.error('请选择学历');
        return;
      }
      if (this.ruleForm.isFullTime == '' || this.ruleForm.isFullTime == null) {
        this.$message.error('请选择是否专职');
        return;
      }

      if (this.ruleForm.workYear == '' || this.ruleForm.workYear == null) {
        this.$message.error('请输入工作年限');
        return;
      }
      if (this.ruleForm.tel == '' || this.ruleForm.tel == null) {
        this.$message.error('请输入手机号');
        return;
      } else if (
        !/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[0123456789])\d{8}$/.test(
          this.ruleForm.tel
        )
      ) {
        this.$message.error('请输入正确的手机号');
        return;
      } else {
        console.log('kkkg');
        if (this.userType == 6) {
          if (
            this.ruleForm.tel == this.formShopShow.storeOwnerPhone ||
            this.ruleForm.tel == this.formShopShow.storeManagerPhone
          ) {
            this.$message.error('手机号不能与店长店主手机号重复');
            return;
          }
        }
      }
      if (this.ruleForm.idCard == '' || this.ruleForm.idCard == null) {
        this.$message.error('请输入身份证号');
        return;
      } else {
        if (
          !/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(
            this.ruleForm.idCard
          )
        ) {
          this.$message.error('请输入正确的身份证号');
          return;
        }
      }

      if (this.ruleForm.status == '' || this.ruleForm.status == null) {
        this.$message.error('请选择状态');
        return;
      }
      if (this.ruleForm.headPicUrl == '' || this.ruleForm.headPicUrl == null) {
        this.$message.error('请上传图片');
        return;
      }
      console.log(this.flagorg, '888999');
      if (this.flagorg == false) {
        let data = {
          userType: this.userType,
          authCode: this.authCode,
          orgSeq: this.orgSeq,
          realName: this.ruleForm.realName,
          onboardDate: this.ruleForm.onboardDate,
          workYear: this.ruleForm.workYear,
          academic: this.ruleForm.academic,
          tel: this.ruleForm.tel,
          status: this.ruleForm.status,
          idCard: this.ruleForm.idCard,
          sex: this.ruleForm.sex,
          headPicUrl: this.ruleForm.headPicUrl,
          userId: this.userId,
          isFullTime: this.ruleForm.isFullTime,
          uuid: this.uuidyuan,
        };
        console.log('ioippp');

        reviewClerkUpdate(data).then((res) => {
          if (res.code == 1) {
            this.$message({
              showClose: true,
              message: res.message,
              type: 'success',
            });
            this.dialogVisibleorg = !this.dialogVisibleorg;
            this.rolemanageone();
          } else {
            this.$message({
              showClose: true,
              message: res.message,
              type: 'error',
            });
          }
        });
      } else if (this.flagorg == true) {
        console.log('ioio');
        let data = {
          userType: '6',
          orgSeq: this.orgSeq,
          authCode: this.authCode,
          realName: this.ruleForm.realName,
          onboardDate: this.ruleForm.onboardDate,
          workYear: this.ruleForm.workYear,
          academic: this.ruleForm.academic,
          tel: this.ruleForm.tel,
          status: this.ruleForm.status,
          idCard: this.ruleForm.idCard,
          sex: this.ruleForm.sex,
          headPicUrl: this.ruleForm.headPicUrl,
          isFullTime: this.ruleForm.isFullTime,
        };
        reviewClerkUpdate(data).then((res) => {
          if (res.code == 1) {
            this.$message({
              showClose: true,
              message: res.message,
              type: 'success',
            });
            this.dialogVisibleorg = !this.dialogVisibleorg;
            this.rolemanageone();
          } else {
            this.$message({
              showClose: true,
              message: res.message,
              type: 'error',
            });
          }
        });
      }
    },

    search() {
      this.listQuery.current = 1;
      let data = {
        size: this.listQuery.size,
        current: this.listQuery.current,
        condition: {
          realName: this.formInline.realName,
          workYear: this.formInline.workYear,
          academic: this.formInline.academic,
          idCard: this.formInline.idCard,
          employeeNo: this.formInline.employeeNo,
          status: this.formInline.status,
          sex: this.formInline.sex,
          authCode: this.authCode,
          orgSeq: this.orgSeq,
          tel: this.formInline.tel,
        },
      };
      qryReviewClerk(data).then((res) => {
        this.total = res.total;
        this.tableData = res.records;
      });
    },
    indexMethod(index) {
      let curpage = this.listQuery.current; //单前页码，具体看组件取值
      let limitpage = this.listQuery.size; //每页条数，具体是组件取值
      return index + 1 + (curpage - 1) * limitpage;
    },
    handledelete(v) {
      let data = {
        uuid: v.uuid,
        userId: v.userId,
      };
      console.log('ioippp');
      this.$confirm('确认删除吗？').then((_) => {
        reviewClerkDelete(data).then((res) => {
          if (res.code == 1) {
            this.$message({
              showClose: true,
              message: '删除成功',
              type: 'success',
            });

            this.rolemanageone();
          } else {
            this.$message({
              showClose: true,
              message: res.message,
              type: 'error',
            });
          }
        });
      });
    },

    updateStatus(uuid, userId, status, userType, row) {
      this.userType = userType;
      let data = Object.assign({}, row, {
        orgSeq: this.orgSeq,
        userType: this.userType,
        status: status,
        uuid: uuid,
        userId: userId,
      });
      // let data = {
      //   orgSeq: this.orgSeq,
      //   userType:this.userType,
      //   status: status,
      //   uuid:uuid,
      //   userId: userId
      // };
      console.log('ioippp11111111111');
      this.$confirm('确认此操作吗？').then((_) => {
        reviewClerkUpdate(data).then((res) => {
          if (res.code == 1) {
            this.$message({
              showClose: true,
              message: '操作成功',
              type: 'success',
            });

            this.rolemanageone();
          } else {
            this.$message({
              showClose: true,
              message: res.message,
              type: 'error',
            });
          }
        });
      });
    },
    handleSizeChange(val) {
      this.listQuery.size = val;
      this.rolemanageone();
    },
    handleCurrentChange(val) {
      this.listQuery.current = val;
      this.rolemanageone();
    },

    rolemanageone() {
      // this.logininfo = localStorage.getItem("logininfo");
      // this.orgList = JSON.parse(this.logininfo).orgList;
      // this.orgSeq = this.$route.params.orgSeq
      // console.log(this.$route.params.orgSeq, "ioio00");
      let data = {
        size: this.listQuery.size,
        current: this.listQuery.current,
        condition: {
          realName: this.formInline.realName,
          workYear: this.formInline.workYear,
          academic: this.formInline.academic,
          idCard: this.formInline.idCard,
          employeeNo: this.formInline.employeeNo,
          sex: this.formInline.sex,
          authCode: this.authCode,
          orgSeq: this.orgSeq,
          tel: this.formInline.tel,
        },
      };
      qryReviewClerk(data).then((res) => {
        this.loading = false;
        this.total = res.total;
        this.tableData = res.records;
        console.log(this.tableData, 'ppe');
      });
    },

    handlePictureCardPreviewyuan(file) {
      this.dialogImageUrl = file.url;
      this.dialogVisibleImg = true;
    },
    upLoadPiconeyuan(file, fileList) {
      this.imgListoneyuan = [];
      this.ruleForm.headPicUrl = file.result;
    },
    handleImgChangeoneyuan(file, fileList) {
      if (file.response) {
        this.imgListoneyuan.push({
          url: file.response.result,
          status: 'finished',
        });
      }
    },

    handleImgChangetwo(file, fileList) {
      if (file.response) {
        this.imgListtwo.push({
          url: file.response.result,
          status: 'finished',
        });
      }
    },

    handleExceed(file, fileList6) {
      this.$message.error(`图片最多上传1张`);
    },
    // ready事件：在你需要二次开发或手动控制其子组件，可以使用在此事件中使用返回的 BMap 类和 map 实例进行手动控制
    // onBaiduMapReady(e) {
    //   console.log("返回BMap类和map实例", e);
    //   const that = this;
    //   this.BMap = e.BMap;
    //   if (this.BMap) {
    //     // 获取定位地址信息并赋值给声明变量
    //     // Geolocation 对象的 getCurrentPosition()、watchPosition()、clearWatch() 方法详解 ：https://blog.csdn.net/zyz00000000/article/details/82774543
    //     const geolocation = new this.BMap.Geolocation();
    //     // 通过 getCurrentPosition() 方法：获取当前的位置信息
    //     geolocation.getCurrentPosition(res => {
    //       console.log("返回详细地址和经纬度", res);
    //       const { lng, lat } = res.point;
    //       const {
    //         province,
    //         city,
    //         district,
    //         street,
    //         street_number
    //       } = res.address;

    //       that.center = { lng, lat };
    //       that.choosedLocation = {
    //         province,
    //         city,
    //         district,
    //         addr: street + street_number,
    //         lng,
    //         lat
    //       };
    //     });
    //   }
    // },

    // /** *
    //  * 地图点击事件。
    //  */
    // getClickInfo(e) {
    //   // 调整地图中心位置
    //   this.center.lng = e.point.lng;
    //   this.center.lat = e.point.lat;

    //   // 此时已经可以获取到BMap类
    //   if (this.BMap) {
    //     const that = this;
    //     // Geocoder() 类进行地址解析
    //     // 创建地址解析器的实例
    //     const geoCoder = new this.BMap.Geocoder();
    //     // getLocation() 类--利用坐标获取地址的详细信息
    //     // getPoint() 类--获取位置对应的坐标
    //     geoCoder.getLocation(e.point, function(res) {
    //       console.log("获取经纬度", e.point, "获取详细地址", res);
    //       //   this.data1 = e.point.lng;

    //       //   alert("经度" + e.point.lng + "纬度" + e.point.lat);
    //       localStorage.setItem("storeLng", e.point.lng);
    //       localStorage.setItem("storeLat", e.point.lat);

    //       //   this.formShop.storeLng = e.point.lng;
    //       //   this.formShop.storeLat = e.point.lat;
    //       const addrComponent = res.addressComponents;
    //       const surroundingPois = res.surroundingPois;
    //       const province = addrComponent.province;
    //       const city = addrComponent.city;
    //       const district = addrComponent.district;
    //       let addr = addrComponent.street;
    //       if (surroundingPois.length > 0 && surroundingPois[0].title) {
    //         if (addr) {
    //           addr += `-${surroundingPois[0].title}`;
    //         } else {
    //           addr += `${surroundingPois[0].title}`;
    //         }
    //       } else {
    //         addr += addrComponent.streetNumber;
    //       }
    //       that.choosedLocation = {
    //         province,
    //         city,
    //         district,
    //         addr,
    //         ...that.center
    //       };
    //     });
    //   }
    // },

    // syncCenterAndZoom(e) {
    //   // 返回地图当前的缩放级别
    //   this.zoom = e.target.getZoom();
    // },
    // /** *
    //  * 确认
    //  */
    // confirm: function() {
    //   //   this.showMapComponent = false;

    //   if (this.addressKeyword == "") {
    //     this.$message({
    //       message: "地址不能为空",
    //       type: "error",
    //       center: true
    //     });
    //   } else {
    //     this.formShop.storeAddressDetail = this.addressKeyword;
    //     this.showMapComponent = false;

    //     this.$emit("cancel", this.showMapComponent);

    //     this.formShop.storeLng = localStorage.getItem("storeLng");
    //     this.formShop.storeLat = localStorage.getItem("storeLat");
    //   }
    //   this.$emit("map-confirm", this.choosedLocation);
    // },
    // /** *
    //  * 取消
    //  */
    // cancel: function() {
    //   console.log(this.addressKeyword, "opop");

    //   if (this.addressKeyword == "") {
    //     this.$message({
    //       message: "地址不能为空",
    //       type: "error",
    //       center: true
    //     });
    //   } else {
    //     this.formShop.storeAddressDetail = this.addressKeyword;
    //     this.showMapComponent = false;

    //     this.$emit("cancel", this.showMapComponent);

    //     this.formShop.storeLng = localStorage.getItem("storeLng");
    //     this.formShop.storeLat = localStorage.getItem("storeLat");
    //   }
    // }
  },

  beforeRouteLeave(to, from, next) {
    // 设置下一个路由的 meta
    to.meta.keepAlive = this.keepAlive; // C 跳转到 A 时让 A 不缓存，即刷新
    next();
  },
  //    beforeRouteLeave (to, from, next) {
  //     // 这里需要elementui的支持，如果使用其他界面组件自行替换即可
  //     this.$confirm('变更内容是否提交审核？', {
  //        confirmButtonText: '确定',
  //        cancelButtonText: '取消',
  //       //  type: 'warning'
  //      }).then(() => {
  //        // 正常跳转
  //         to.meta.keepAlive = this.keepAlive;
  //         this.postFormAjaxone();
  //      }).catch(() => {
  //        // 如果取消跳转地址栏会变化，这时保持地址栏不变
  //        this.postFormAjaxquxiaoone();

  //        console.log("999")
  //       //  window.history.go(1)
  //      })
  //  },
};
</script>

<style lang="scss" scoped>
.el-form-item /deep/ .el-upload--picture-card {
  width: 100px;

  height: 100px;
}

/deep/.el-upload-list--picture-card .el-upload-list__item {
  overflow: hidden;
  background-color: #fff;
  border: 1px solid #c0ccda;
  border-radius: 6px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 100px;
  height: 100px;
  margin: 0 8px 8px 0;
  display: inline-block;
}

.el-form-item /deep/ .el-upload {
  width: 100px;

  height: 100px;

  line-height: 100px;
}

/deep/ .el-input--suffix .el-input__inner {
  padding-right: 0px;
  font-size: 12px;
}

.el-form-item /deep/ .avatar {
  width: 100px;

  height: 100px;

  display: block;
}

#add-cater-merchants {
  h2 {
    font-size: 24px;
    font-weight: 700;
    padding-top: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgb(230, 231, 235);
  }

  .container {
    margin-top: 10px;
  }

  .el-input--medium .el-input__inner {
    height: auto !important;
  }

  .idcard {
    display: flex;
  }

  .idcard div {
    margin: 10px;
  }

  .bussLicPhoto {
    display: flex;
  }

  .bussLicPhoto div {
    margin: 5px;
    text-align: center;
  }
}

#add-cater-merchants.route-page {
  background: #fff;
  width: 100%;
  padding: 3% 0;
  margin: 0 auto;
  border: 2px #ccc dashed;
  margin-top: 2%;
}

.xizai {
  float: left;
  padding: 9px 15px;
  color: #fff;
  background-color: #409eff;
  border-color: #409eff;
  font-size: 12px;
  border-radius: 3px;
  margin-top: 11px;
  margin-right: 100px;
}

/deep/.distpicker-address-wrapper select {
  height: 34px;
  font-size: 13px;
}

.grid-content__select {
  margin-top: 10px;
  margin-left: 10px;
  width: 200px;

  &--popper {
    width: 300px;
  }
}
</style>
